API errors
Current failure behavior
ProcessController.gradeExam wraps CSV parsing, image processing, OCR, and grading in one try block. If any exception escapes those operations, the controller:
- Logs the exception server-side.
- Returns HTTP
500 Internal Server Error. - Sends an empty response body.
The response does not expose a structured error code or message.
What is not defined
The source does not define product-specific responses for missing multipart parts, malformed CSV, unreadable images, unsupported image formats, OCR initialization failure, oversized uploads, authentication failures, or rate limits. Do not treat those cases as a documented 4xx contract.
The endpoint is unauthenticated. A public deployment should not be considered safe until authentication, request limits, input validation, structured errors, and controlled debug output are implemented and tested.