Wrap camera.read_frame() call in try/except to catch RuntimeError and return a 503 Service Unavailable response with structured error JSON (error + detail fields) instead of letting the exception propagate as an unhandled 500. This gives kiosk operators a friendly, actionable error message when the camera becomes unavailable. Added FailingCamera test fixture and regression test that verifies the 503 response with expected error details. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_api.py | ||
| test_camera.py | ||
| test_catalogue.py | ||
| test_image_processing.py | ||
| test_manual_button_strategy.py | ||
| test_motion_stop_strategy.py | ||
| test_session.py | ||
| test_sizing.py | ||
| test_stable_centered_strategy.py | ||