Generate fresh questions for a student to retry a failed assessment.
x-api-key session middleware. No additional fields needed in the request body.| Condition | Result |
|---|---|
| Assessment is locked (passed) | 403 ASSESSMENT_LOCKED |
| No prior attempt exists | 400 NO_PRIOR_ATTEMPT |
| Last attempt was passed | 403 ASSESSMENT_PASSED |
| Last attempt was failed | Allowed — new questions generated |
| Code | HTTP | Description |
|---|---|---|
MISSING_VERIFICATION_ID | 400 | No recordVerificationId in session |
ASSESSMENT_LOCKED | 403 | Already passed and locked |
NO_PRIOR_ATTEMPT | 400 | No prior attempt — use generate for first attempt |
ASSESSMENT_PASSED | 403 | Last attempt was a pass — retake not permitted |
NO_DATA | 400 | No projects, experience, or certificates found |
NO_SKILLS | 400 | No skills found for this session |
GENERATION_FAILED | 500 | AI generation returned zero questions |
INTERNAL_ERROR | 500 | Unexpected server error |