How should backend exceptions be handled?

What is the canonical way of dealing with exceptions in backend extensions?

My understanding is that recently added a wrapper around most back-end calls that will just catch and log unhandled exceptions to prevent the core from crashing.

Apart from just logging fatal exceptions and trying to follow the skip-to-next-track-upon-error approach, is there another way of notifying the user that something has gone wrong and perhaps revert to some predictable state in Mopidy (e.q. current track paused, redirected to front-end landing page, or something along those lines)?

We’ve recently been talking about fixing this, but don’t think we’ve added a bug yet. The current idea was to add a message(text, level=None, source=None) signal (or something like that) and then emit messages when something breaks. This event should then get to web clients, the MPD frontend etc.

This should probably be a nice starter bug for anyone wanting to help out with development :slight_smile:

Forgot that we have