Skip to content

0.5.8 — the heater test no longer blanks the page

Choose a tag to compare

@mattg8892 mattg8892 released this 23 Aug 22:48
· 4 commits to main since this release

Clicking "Test the heater for 5 seconds" turned the settings page black. Fixed, along with the underlying bug it exposed.

What happened

The button posts no body, but the endpoint required one, so the camera answered 422. FastAPI returns validation errors as a list of objects rather than a string — and the code put that straight into the page. React threw Objects are not valid as a React child mid-render and unmounted everything, so the screen went black with the reason visible only in the browser console.

Fixed

  • The heater test accepts an empty request, meaning the default 5-second pulse.
  • No screen renders a server error unflattened any more. All nine places that show an error message now reduce any shape the API can return to readable text, naming the offending field where there is one. Every one of them was a single bad request away from the same black screen — this was not specific to the heater button.

Note

Nothing about heater safety changed. The pulse is still capped at fifteen seconds and the pin is still switched off in a finally block, so a disconnected page cannot leave it on.