Status codes
The two 422s
The same status code covers two completely different problems with two different owners. Tell them apart by the presence of detail, not by the HTTP code.
spoofing: true: if your code approves by exclusion, here it approves someone whose face it never even saw.
Invalid body is a code problem. detail[].loc tells you exactly which field is wrong; in the example, info was sent as an object when the contract asks for a string. It is fixed on your side and reproduces every time.
400: the image fails a hard requirement
401: credentials
statusCode, not code, and carries no id: it is rejected before a transaction is created. Check that the header is spelled exactly Api-Key and that the key matches the environment of the base URL you are calling. Mixing the UAT key with the production URL is the most common cause.
500: not all of them are the service’s
A 500 looks like a provider problem, but in practice most of them are caused by the request: of the five 500 bodies observed in testing, four originated in the request — an image the decoder could not process, a malformed payload.
The reliable test is determinism:
1
Retry the same request once
Same body, nothing changed.
2
Compare the error
If the same
error comes back, the problem is in your request: check the image and the payload. If it differs or the call succeeds, it was transient.3
If it is deterministic, stop retrying
File a ticket with the
id and the error body. More retries only add load.Retry policy
Filing a ticket
Write to customer.support@vusecurity.com with:Do not attach the original image unless support explicitly asks for it through an agreed channel: it is biometric data belonging to a real person.
Back to the introduction
The decision rule, the endpoints, and authentication.