Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Improved error logging for unmatched routes and route not found #45191

Closed

Conversation

i386
Copy link
Contributor

@i386 i386 commented Dec 6, 2022

This change adds some improved error messages so that poor client usages (for example, older versions of mobile clients) can be identified via sentry logging etc. At the moment this is impossible to do without logging every request.

The change targets the following:

  • handleMatchedRoute's NotFoundHttpException
  • methodNotAllowed's MethodNotAllowedHttpException

* @param array $others
* @param string $method
* @return void
*
* @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
*/
protected function methodNotAllowed(array $others, $method)
protected function methodNotAllowed($request, array $others, $method)
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change to the method signature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can have two of them. One for the old behaviour and one for the new behaviour.

@driesvints driesvints changed the title Improved error logging for unmatched routes and route not found [9.x] Improved error logging for unmatched routes and route not found Dec 6, 2022
@i386
Copy link
Contributor Author

i386 commented Dec 6, 2022

@taylorotwell why close?

@i386
Copy link
Contributor Author

i386 commented Dec 6, 2022

Recreated #45206 based on feedback

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.

None yet

3 participants