Skip to content

[9.x] Add 402 exception view#45682

Merged
taylorotwell merged 1 commit into
laravel:9.xfrom
zepfietje:add-402-exception-view
Jan 17, 2023
Merged

[9.x] Add 402 exception view#45682
taylorotwell merged 1 commit into
laravel:9.xfrom
zepfietje:add-402-exception-view

Conversation

@zepfietje

Copy link
Copy Markdown
Contributor

Currently no error page exists for exceptions with an HTTP status code of 402 Payment Required.
Even though it's a nonstandard response status code, it's used by multiple large companies to indicate functionality limited due to a payment being required.

Personally, I'm using it in a SaaS project where certain features are only available on a paid plan. If the locked functionality involves entire (public-facing) pages/routes, it makes sense to show a default error view. For example: when users who are not entitled to use the paid feature of embedding a scheduling page on their own site still try to embed the page, they should be greeted with the new 402 exception view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants