diff --git a/src/guide/runtime/handling-errors.md b/src/guide/runtime/handling-errors.md index e62dda22..e2864681 100644 --- a/src/guide/runtime/handling-errors.md +++ b/src/guide/runtime/handling-errors.md @@ -82,14 +82,14 @@ use Yiisoft\Injector\Injector; return [ // ... - ErrorHandler::class => static function (ResponseFactoryInterface $responseFactory, Injector $injector) { + ExceptionResponder::class => static function (ResponseFactoryInterface $responseFactory, Injector $injector) { $exceptionMap = [ // Status code with which the factory creates the response. MyNotFoundException::class => 404, // PHP callable that must return a `Psr\Http\Message\ResponseInterface`. MyHttpException::class => static fn (MyHttpException $exception) => new MyResponse($exception), // ... - ], + ]; return new ExceptionResponder($exceptionMap, $responseFactory, $injector); },