Skip to main content

Error Response Format

All APIs return errors in a JSON:API-style errors array:
The errors field is always an array — even for single errors. Always parse errors[0] rather than treating the response as a flat object.

HTTP Status Codes

Common Errors

The most common error. Your access token expires after 300 seconds (5 minutes) with no refresh token support.Fix: Request a new token using the token caching pattern. If you see frequent 401s, your token caching isn’t refreshing proactively enough — refresh at least 30 seconds before expiry.
Common in the YOMA ecosystem where youth interact with multiple partners. If Thandi was already onboarded by another partner, POST /users returns 201 Created with an empty tempPassword — not an error code, not a different status. The only indicator is the empty string.What to do: Check tempPassword. If empty, the account already exists — skip onboarding emails and proceed directly to credential issuance.
The request body contains invalid data.
Attribute validation errors don’t specify which attribute failed. The detail message only references the template ID. To debug: compare your payload keys against the template’s attribute schema. Log the template definition (via GET /templates/credentials/{id}) and diff it against your request.
A template ID, presentation ID, or credential ID is incorrect or has been deleted.Fix: Verify the ID is correct and the resource hasn’t been archived.
An unexpected server error. Not caused by your request. Retry after a short delay.Fix: If persistent, contact the YoID team and include the error id.

Error Handling Pattern