Deprecated error handler

Hi everyone!

Running Sanic in a new version, I now get the following error:

You are using a deprecated error handler. The lookup method should accept two positional parameters: (exception, route_name: Optional[str]). Until you upgrade your ErrorHandler.lookup, Blueprint specific exceptions will not work properly. Beginning in v22.3, the legacy style lookup method will not work at all.

Unfortunately, I have no idea where the error is. The @app.exception wrapper I have already contains two parameters (request, exception) so I’m not sure where this would be ?

Can someone help me pinpoint where the issue is?

Thank you in advance.

This means you’re using a plugin or sanic extension that was built for an older version of Sanic. The most common with this issue is Sentry, are you using that?

It is unrelated to your @app.exception handlers in your app.

I am, indeed, using Sentry!

That might be it then. Just out of curiosity, do you happen to know what will happen if Sanic go in v22.3 and Sentry doesn’t do the changes?
Will only Sentry stop working, or the whole Sanic server won’t stop?

Thank you for that clarification.

Make some noise to get this merged.

I suspect they will sometime around the next LTS. But if not, then it will break in March. I suspect if that’s the case then I’ll post somewhere a monkey patch for anyone that needs it. That’s still 6 months away so I’d be surprised if it comes to that.

Thanks! We’ll see until then :slight_smile:

I’ll keep on eye on this too.