Open SteveMicroNova opened 3 weeks ago
The place to start looking at this is https://github.com/micro-nova/AmpliPi/blob/7cc2f2a4472a194323f41b0d31b63e153f872871/amplipi/app.py#L296. I'm sure there are a couple of more places, but almost all of the requests are funneled through there.
In our in-house inventory manager, I raise all errors with a custom error object. Here's what that looks like:
This specialized exception detail is consumable by things such as the components in the
StatusBars
folder no problem to preserve the error, but also share a user-understandable reason why something went wrong and sometimes even directions for how to fix it. We can't do everything the same way in AmpliPi, our users don't sit 15 feet behind me to tell me when something goes wrong, but there is something to be gained by this in support of #326