{"record":{"id":"9e5a39d9369edabc","repo":"yiisoft/yii2","slug":"none-of-your-requested-content-types-is-supported","errorCode":null,"errorMessage":"None of your requested content types is supported.","messagePattern":"None of your requested content types is supported\\.","errorType":"http","errorClass":"NotAcceptableHttpException","httpStatus":406,"severity":"error","filePath":"framework/filters/ContentNegotiator.php","lineNumber":224,"sourceCode":"                $response->format = $this->formats[$type];\n                $response->acceptMimeType = $type;\n                $response->acceptParams = $params;\n                return;\n            }\n        }\n\n        foreach ($this->formats as $type => $format) {\n            $response->format = $format;\n            $response->acceptMimeType = $type;\n            $response->acceptParams = [];\n            break;\n        }\n\n        if (isset($types['*/*'])) {\n            return;\n        }\n\n        throw new NotAcceptableHttpException('None of your requested content types is supported.');\n    }\n\n    /**\n     * Negotiates the application language.\n     * @param Request $request\n     * @return string the chosen language\n     */\n    protected function negotiateLanguage($request)\n    {\n        if (!empty($this->languageParam) && ($language = $request->get($this->languageParam)) !== null) {\n            if (is_array($language)) {\n                // If an array received, then skip it and use the first of supported languages\n                return reset($this->languages);\n            }\n            if (isset($this->languages[$language])) {\n                return $this->languages[$language];\n            }\n            foreach ($this->languages as $key => $supported) {","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/filters/ContentNegotiator.php#L206-L242","documentation":"Error \"None of your requested content types is supported.\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/filters/ContentNegotiator.php:224 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}