{"record":{"id":"0f8648c540792462","repo":"filp/whoops","slug":"invalid-status-code-code-must-be-between-0-and","errorCode":null,"errorMessage":"Invalid status code '$code', must be between 0 and 254","messagePattern":"Invalid status code '\\$code', must be between 0 and 254","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Whoops/Run.php","lineNumber":346,"sourceCode":"\n    /**\n     * Should Whoops exit with a specific code on the CLI if possible?\n     * Whoops will exit with 1 by default, but you can specify something else.\n     *\n     * @param int $code\n     *\n     * @return int\n     *\n     * @throws InvalidArgumentException\n     */\n    public function sendExitCode($code = null)\n    {\n        if (func_num_args() == 0) {\n            return $this->sendExitCode;\n        }\n\n        if ($code < 0 || 255 <= $code) {\n            throw new InvalidArgumentException(\n                \"Invalid status code '$code', must be between 0 and 254\"\n            );\n        }\n\n        return $this->sendExitCode = (int) $code;\n    }\n\n    /**\n     * Should Whoops push output directly to the client?\n     * If this is false, output will be returned by handleException.\n     *\n     * @param bool|int $send\n     *\n     * @return bool\n     */\n    public function writeToOutput($send = null)\n    {\n        if (func_num_args() == 0) {","sourceCodeStart":328,"sourceCodeEnd":364,"githubUrl":"https://github.com/filp/whoops/blob/fa1bc9c95a1b392fbdb8a410dbbcb1d6a030fff7/src/Whoops/Run.php#L328-L364","documentation":"Error \"Invalid status code '$code', must be between 0 and 254\" thrown in filp/whoops.","triggerScenarios":"Thrown at src/Whoops/Run.php:346 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":"fa1bc9c95a1b392fbdb8a410dbbcb1d6a030fff7","analyzedAt":"2026-08-21T01:30:26.400Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}