Store config loading errors for upstream handling#305
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
Addded specific feedback related to using unquoted template fdunctions starting a value
|
@pSpitzner @semohr |
|
Seems like mypy is not too happy yet. Feel free to ping us again if we forget about it 😨 |
|
@semohr @pSpitzner |
Uhm, we do propagate raised errors to the fronted already 🥲 You can find the error handler here.
I dont think we need the websocket additions you added in this PR. Just converting the scanner errors into configurationerrors and re-raising them should be sufficient. Lets not introduce more complexity if not necessary. |
Apologies my description was a bit vague.
thats fine I added that so the config status is available on each connect. Happy to discuss further and remove that websocket "on connect" if thats unnecessary |
We added the exception handling to the terminal feature flag to circumvent that exact issue (which you seem to have removed here). The web server startup should be independent of the configuration. I think, if we should just reraise the YAML parser errors as ConfigurationError as they are sufficiently handled already. Could you try that here? |

This PR (backend only) addresses issues encountered in #304
Currently if the parsing of the beets or beets-flask configs fails (yaml syntax, validation, etc)
the app crashes silently and fails to load the UI.
This is a poor user experience and paindul to diagnose.
In this PR we store any errors and provide them (via the socket)
back to the frontend for user examination
Leaving this as a draft as its incomplete (needs tests for backend)
Once the Tests are done this could be merged in and the frontend done separately
NOTE: I havent done much work with TypeScript so have no real idea how to capture/display/handle the "config_status"
message at app startup.
Im happy to work with anyone to move this forward.