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

Upgrade guide: mention router changes in 8.x #409

Closed
dmorneau opened this issue Jul 8, 2020 · 1 comment
Closed

Upgrade guide: mention router changes in 8.x #409

dmorneau opened this issue Jul 8, 2020 · 1 comment

Comments

@dmorneau
Copy link

dmorneau commented Jul 8, 2020

In a Phoenix app with Sentry 7.x, the router would typically contain this:

  use MyAppWeb, :router
  use Plug.ErrorHandler
  use Sentry.Plug

When upgrading to 8.x, I removed Sentry.Plug, but I didn't realize that Plug.ErrorHandler was tied to it, so I left it in. This caused the app behaviour to change: when an exception like Ecto.InvalidChangesetError is thrown, the app started responding using Plug.ErrorHandler's default handling ("Something went wrong"), rather going through the ErrorView which renders a proper JSON response.

It could be good to mention removing both these lines in the upgrade guide.

@mitchellhenke
Copy link
Contributor

Thank you a bunch, I've added detail for this to the guide! 💖

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

No branches or pull requests

2 participants