Skip to content

when requesting a non existing variation URL, return a 404 NotFoundHttpException instead of a VariationNotFoundException#6

Merged
xavierlacot merged 2 commits intomainfrom
fix/notfoundhttpexception-on-unknown-variation
Jul 23, 2025
Merged

when requesting a non existing variation URL, return a 404 NotFoundHttpException instead of a VariationNotFoundException#6
xavierlacot merged 2 commits intomainfrom
fix/notfoundhttpexception-on-unknown-variation

Conversation

@xavierlacot
Copy link
Member

No description provided.

…tpException instead of a VariationNotFoundException
@xavierlacot xavierlacot added the enhancement New feature or request label Jul 23, 2025
@damienalexandre
Copy link
Member

Keep the domain exception and add it to the framework config:

# config/packages/framework.yaml
framework:
    exceptions:
        Symfony\Component\HttpKernel\Exception\BadRequestHttpException:
            log_level: debug
            status_code: 422
        App\Something\Exception\SomeException:
            log_level: alert
            status_code: 503

Copy link
Member

@damienalexandre damienalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore my previous comment ^^

Co-authored-by: Damien Alexandre <mobman02@gmail.com>
@xavierlacot xavierlacot merged commit 9b1533a into main Jul 23, 2025
3 checks passed
@xavierlacot xavierlacot deleted the fix/notfoundhttpexception-on-unknown-variation branch July 23, 2025 08:49
@tacman tacman mentioned this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants