{"record":{"id":"17cbc09e553ada48","repo":"symfony/http-foundation","slug":"the-s-http-header-is-not-parseable-s","errorCode":null,"errorMessage":"The \"%s\" HTTP header is not parseable (%s).","messagePattern":"The \"(.+?)\" HTTP header is not parseable \\((.+?)\\)\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"HeaderBag.php","lineNumber":197,"sourceCode":"    public function getDate(string $key, ?\\DateTimeInterface $default = null): ?\\DateTimeImmutable\n    {\n        if (null === $value = $this->get($key)) {\n            return null !== $default ? \\DateTimeImmutable::createFromInterface($default) : null;\n        }\n\n        if (false === $date = \\DateTimeImmutable::createFromFormat(\\DATE_RFC2822, $value)) {\n            throw new \\RuntimeException(\\sprintf('The \"%s\" HTTP header is not parseable (%s).', $key, $value));\n        }\n\n        return $date;\n    }","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/symfony/http-foundation/blob/5aea19cd678fa4140f6108406f1096de5e9ed6e4/HeaderBag.php#L179-L215","documentation":"A RuntimeException thrown by HeaderBag::getDate() when the named header exists but its value cannot be parsed with DateTimeImmutable::createFromFormat(DATE_RFC2822, ...). The header value at fault is the malformed date string (e.g. a corrupt Expires or Last-Modified header); it is not raised when the header is absent (the $default path applies instead).","triggerScenarios":"Thrown at HeaderBag.php:197 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Catch the RuntimeException and fall back to the $default argument or a safe timestamp","Sanitize or correct the header value so it conforms to RFC 2822 before calling getDate()","Use HeaderBag::get() plus DateTimeImmutable::createFromFormat manually with more lenient formats"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5aea19cd678fa4140f6108406f1096de5e9ed6e4","analyzedAt":"2026-09-13T01:52:22.855Z","contentChangedAt":"2026-09-13T01:52:22.855Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}