Whenever we call your API and there's a problem, we can try and handle this error gracefully.
HTTP status codes 401
and 403
are assumed to be caused by an invalid token.
On other status codes between 400
- 500
we'll show "There was a problem with the {partner.name} API". You can send a message that will be shown to the user in the response body, e.g.:
GET {partner.urls.send_assessment} HTTP/1.1
Content-Type: application/json
Status: 402
{"error": "No credits left"}