v1
Guide

Errors

Every error response has the same shape: a stable code for your program to decide on and a message for a person to read.

The error body

Error
{
  "error": "validation_failed",
  "message": "O campo name é obrigatório."
}
FieldWhat it is
errorThe error code, in snake_case. It is stable: decide on it, never on the message text.
messageThe explanation, written in Portuguese, ready to show to a person or write to a log.
errorsPresent in some validation failures: the list of problems found.
failuresPresent on 422: each business rule that blocked the operation.
traceIdPresent in most errors: the request id. Give it to support so the call can be found.

The statuses

StatusDefault codeWhen
400validation_failedA body that is not JSON, a missing required field or a value in the wrong format.
401unauthorizedMissing or invalid credentials.
402payment_requiredThe plan's monthly request quota ran out.
403forbiddenThe key is missing the scope, or the plan does not include the feature.
404not_foundThe record does not exist in this company.
409conflictThe current state of the record prevents the operation.
422unprocessableThe request is valid, but a business rule blocks it.
429too_many_requestsThe requests-per-minute limit was reached.
5xxA failure on Guria's side. Try again with increasing waits.

What is worth retrying

  • Retry 429 (after the time in the Retry-After header) and 5xx, with increasing waits between attempts.
  • Do not retry 400, 401, 403, 404, 409 and 422 without changing the request: the response will be the same.
  • Be careful when retrying a creation: if the response got lost on the way, the record may have been created. Read before creating again.