Repository navigation
fix: handle MethodNotAllowedHttpException with styled 405 page - #414
Merged
navneetkumar-pim-webkul merged 3 commits intoMay 26, 2026
Merged
navneetkumar-pim-webkul merged 3 commits into
navneetkumar-pim-webkul merged 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a global handler for MethodNotAllowedHttpException so admin users get the existing styled error page (or a JSON response including the Allow header) instead of the default debug output when an endpoint is hit with the wrong HTTP method.
Changes:
- Render a styled 405 admin error page (or JSON) for
MethodNotAllowedHttpExceptionviabootstrap/app.php. - Add localized
admin::app.errors.405strings across supported admin locales. - Update
.gitignoreto ignore.mcp.json(and adjust Playwright ignore entries).
Reviewed changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
bootstrap/app.php |
Adds a global exception renderer for MethodNotAllowedHttpException returning admin error view or JSON with headers. |
.gitignore |
Updates ignore patterns (Playwright artifacts / .mcp.json). |
packages/Webkul/Admin/src/Resources/lang/en_US/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/en_GB/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/en_AU/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/en_NZ/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/zh_CN/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/zh_TW/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/ja_JP/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/ko_KR/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/fr_FR/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/de_DE/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/es_ES/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/es_VE/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/it_IT/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/pt_PT/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/ru_RU/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/tr_TR/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/vi_VN/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/uk_UA/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/ar_AE/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/ca_ES/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/da_DK/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/fi_FI/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/hr_HR/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/id_ID/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/mn_MN/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/nl_NL/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/no_NO/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/pl_PL/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/ro_RO/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/sv_SE/app.php |
Adds errors.405 title/description. |
packages/Webkul/Admin/src/Resources/lang/tl_PH/app.php |
Adds errors.405 title/description. |
…wed-error-page # Conflicts: # .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Catches MethodNotAllowedHttpException globally in bootstrap/app.php and returns the admin 405 view (or JSON with the Allow header) instead of Ignition's debug page when a POST-only route like /admin/catalog/products/mass-delete is hit with GET.