{"record":{"id":"6fe73d204a44dca9","repo":"slimphp/Slim","slug":"no-parser-for-type-s","errorCode":null,"errorMessage":"No parser for type %s","messagePattern":"No parser for type (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"Slim/Middleware/BodyParsingMiddleware.php","lineNumber":92,"sourceCode":"        return $this;\n    }\n\n    /**\n     * @param string $mediaType A HTTP media type (excluding content-type params).\n     */\n    public function hasBodyParser(string $mediaType): bool\n    {\n        return isset($this->bodyParsers[$mediaType]);\n    }\n\n    /**\n     * @param string $mediaType A HTTP media type (excluding content-type params).\n     * @throws RuntimeException\n     */\n    public function getBodyParser(string $mediaType): callable\n    {\n        if (!isset($this->bodyParsers[$mediaType])) {\n            throw new RuntimeException('No parser for type ' . $mediaType);\n        }\n        return $this->bodyParsers[$mediaType];\n    }\n\n    protected function registerDefaultBodyParsers(): void\n    {\n        $this->registerBodyParser('application/json', static function ($input) {\n            /** @var string $input */\n            $result = json_decode($input, true);\n\n            if (!is_array($result)) {\n                return null;\n            }\n\n            return $result;\n        });\n\n        $this->registerBodyParser('application/x-www-form-urlencoded', static function ($input) {","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/slimphp/Slim/blob/80900fb39cafce3ae53b18a2c4f642a122f03095/Slim/Middleware/BodyParsingMiddleware.php#L74-L110","documentation":"Error \"No parser for type %s\" thrown in slimphp/Slim.","triggerScenarios":"Thrown at Slim/Middleware/BodyParsingMiddleware.php:92 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":"80900fb39cafce3ae53b18a2c4f642a122f03095","analyzedAt":"2026-08-21T01:41:09.580Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}