{"record":{"id":"d6ce42e48482518f","repo":"Seldaek/monolog","slug":"the-nested-handler-of-type","errorCode":null,"errorMessage":"The nested handler of type ","messagePattern":"The nested handler of type ","errorType":"exception","errorClass":"UnexpectedValueException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/SamplingHandler.php","lineNumber":106,"sourceCode":"            $this->handler = $handler;\n        }\n\n        return $this->handler;\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function setFormatter(FormatterInterface $formatter): HandlerInterface\n    {\n        $handler = $this->getHandler();\n        if ($handler instanceof FormattableHandlerInterface) {\n            $handler->setFormatter($formatter);\n\n            return $this;\n        }\n\n        throw new \\UnexpectedValueException('The nested handler of type '.\\get_class($handler).' does not support formatters.');\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function getFormatter(): FormatterInterface\n    {\n        $handler = $this->getHandler();\n        if ($handler instanceof FormattableHandlerInterface) {\n            return $handler->getFormatter();\n        }\n\n        throw new \\UnexpectedValueException('The nested handler of type '.\\get_class($handler).' does not support formatters.');\n    }\n}\n","sourceCodeStart":88,"sourceCodeEnd":122,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/SamplingHandler.php#L88-L122","documentation":"Error \"The nested handler of type \" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/SamplingHandler.php:106 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":"57eb1028342134e701e77c617565d51b6e5a2a53","analyzedAt":"2026-08-17T02:36:30.259Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}