Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[RFC] Translatable HTTP exceptions #49687

Closed
@ro0NL

Description

@ro0NL

Description

This would solve #49653 and also play nice with #[WithHttpStatus(4xx)].

The idea is any HttpException can be given a translatable message:

throw new HttpException(400, t('id'));

Im just not sure if the normalizer should expose any translatable message, or just 4xx ones.
edit: actually i think translatable messages should always be exposed, even 5xx responses could use some helpful hints for the user 😅

but then the line between what's exposed, and what's not becomes super thin, so maybe this needs a new new ExposedHttpException() / new HttpException(expose: true)

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions