Error Reference

The current app uses framework-native errors instead of a canonical SDK error code system.

Frontend service wrappers

  • Backend service helpers check response.ok and throw Error instances when a request fails.
  • Thrown messages usually include the HTTP status and backend response text when available.
  • Fetch timeouts are surfaced as request failures, with longer timeouts for heavier export paths.
  • Case export retries common localhost and 127.0.0.1 base URL variants before failing.

Backend HTTP errors

  • HTTPException is used for invalid planner, spacer, busbar, and estimate requests.
  • Validation failures from FastAPI/Pydantic return standard 422 responses.
  • Geometry generation failures may return 4xx errors for invalid inputs or 5xx errors for unhandled generation issues.
  • There is no stable machine-readable BatteryBee error code registry yet.

User-facing handling

  • Designer forms prevent many invalid geometry states before requests are sent.
  • Export and estimate panels display warnings and failures inline.
  • Troubleshooting should start by checking the active tab inputs, backend availability, browser console, and backend logs.