supervisor icon indicating copy to clipboard operation
supervisor copied to clipboard

Eliminate exceptions without message reaching api_return_error

Open agners opened this issue 2 months ago • 1 comments

Description

The generic API handler api_return_error converts exceptions without message into "Unknown error, see supervisor". Such errors are not very useful to users, we should replace them with custom exception classes along with a user friendly message telling what is wrong.

Let's eliminate obvious/known cases where we raise Exceptions without messages first, then capture such events in Sentry to find other commonly occurring errors without messages.

Additional context

No response

agners avatar Nov 04 '25 15:11 agners

One of the issues seen in Support is when people are using ha auth reset --username test --password <newpw>, so far this lead to:

Error: Unknown error, see Supervisor logs

Which very much sounds like a problem with the command in first place. Since we have ha auth reset --interactive which lists users as well, the message should make clear that the username is wrong.

agners avatar Dec 03 '25 12:12 agners