UserFrosting icon indicating copy to clipboard operation
UserFrosting copied to clipboard

Implement MethodNotAllowedHandler

Open alexweissman opened this issue 7 years ago • 3 comments

Right now we rely on Slim's default NotAllowed handler for dealing with MethodNotAllowedException (405 errors). This sucks because it is stylistically inconsistent and diverges from our generic/debug exception handling system.

We should do a passthrough in Slim's notAllowedHandler, just like we have now done with phpErrorHandler and notFoundHandler, to throw our own MethodNotAllowedException and process it with one of our exception handlers (HttpExceptionHandler or a subtype).

However since the default handler can already return multiple different content types, I recommend we resolve #783 first, before attempting to resolve this issue.

alexweissman avatar Aug 19 '17 00:08 alexweissman

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 19 '19 14:04 stale[bot]

Still an issue

alexweissman avatar Dec 01 '20 21:12 alexweissman

FYI, as of https://github.com/userfrosting/sprinkle-core/commit/5c6f47cb5db67a6d0972815e86dd853d9e3fc1a4, MethodNotAllowedException is properly handled by UF Error Handler in V5.

lcharette avatar Nov 21 '21 03:11 lcharette