Skip to content

Extract response generator from ErrorCatcher middleware #129

@olegbaturin

Description

@olegbaturin

Move ErrorCatcher logic to ErrorResponseFactory.
https://github.com/olegbaturin/yii3-error-handler/blob/error-response-factory/src/ErrorResponseFactory.php
https://github.com/olegbaturin/yii3-error-handler/blob/error-response-factory/src/Middleware/ErrorCatcher.php

Add ErrorResponseFactoryInterface, so application can implements own ErrorResponseFactory, and ExceptionResponder middleware with custom exception parsers can become a part of ErrorResponseFactory.
https://github.com/olegbaturin/yii3-app-api/blob/master/src/Renderer/Error/ErrorResponseFactory.php

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions