Skip to content

[3.2] Bc break with exception handling #5924

@lyrixx

Description

@lyrixx

API Platform version(s) affected: 3.2

In 3.1, when an exception occurs, Symfony set the _controller (in ErrorListener) to api_platform.action.exception
In 3.2 it's api_platform.symfony.main_controller.

There is a drawback, because in my exception, I have some headers, and there are not replicated anymore in the final response.

How to reproduce

throw new TooManyRequestsHttpException(32);

And see the is not "Retry-After" header in the response

Possible Solution

  • revert the change
  • or add support for header duplication in the MainController

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions