public function isJsonApi($request, Exception $e)
    {
        if (Helpers::wantsJsonApi($request)) {
            return true;
        }

        /** @var Route $route */
        $route = app(JsonApiService::class)->currentRoute();

        return $route->hasCodec() && $route->getCodec()->willEncode();
    }