Every prediction route currently returns 500 when the database is unreachable,
because log_prediction() runs unguarded on the request path. The model is fine;
it is the audit trail that fails, and it drags the response down with it.
- log_prediction() is now best-effort: failures go to the application log and
the prediction is served regardless
- GET /predict/{id} genuinely needs the database (the employee record is its
input), so an outage there is reported as 503 with a message pointing at
POST /predict, instead of a bare 500
- insert_data.py read its three CSVs from hard-coded absolute paths that no
longer exist (the folder was renamed from "OC P4" to "OC_P4"); the directory
is now taken from P5_DATA_DIR, and a missing file fails with a clear message
instead of a traceback
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>