Skip to content
ES

Errors and error handling

Zentto Digital Print returns errors with a uniform structure. This page documents the error structure, HTTP codes, service-specific codes (with the suggested action for each) and the recommended error-handling strategy.

{ "codigo": "string", "mensaje": "string", "validaciones": ["string"] }
CodeDescription
400 Bad RequestThe request contains a syntax error or incorrect parameters.
401 UnauthorizedAuthentication is required and has failed or was not provided.
403 ForbiddenThe server understood the request but refuses to authorize it.
404 Not FoundThe requested resource could not be found.
405 Method Not AllowedThe HTTP method used is not allowed for this endpoint.
CodeDescription
500 Internal Server ErrorAn unexpected error occurred on the server.
502 Bad GatewayThe server received an invalid response from the upstream server.
503 Service UnavailableThe server is temporarily unavailable (maintenance or overload).
504 Gateway TimeoutThe gateway/proxy did not receive a timely response.
CodeDescriptionSuggested action
100Document processing error (database insertion)Retry after a delay; report to support if it persists.
200Document processed successfullyContinue; persist control number and consultUrl.
201Duplicate documentDo not resend; query the existing document status.
202Check the billing-point information for automatic assignmentReview billing-point/series configuration.
203Document not processed (validation rejection: missing required field / wrong format / etc.)Fix the payload per the returned validations.
204Error generating control numberRetry; verify numbering availability.
205Does not meet minimal validations (Art. 28)Complete the required minimal information.
210Minimal information recorded correctlyContinue.
211The minimal information had already been recorded (duplicate)Do not resend.
400Error in the Request structureValidate the JSON structure before resending.
401Unauthorized (token/credentials error or absence)Renew token/credentials (valid 12 h).
500Internal processing errorRetry after a delay; report to support if it persists.
  • Reenvío: on error, retry with a minimum 30-second delay (only for already-sent documents).
  • Validación previa: verify that minimal required fields contain data to avoid 400 Bad Request.
  • Autenticación: on 401, verify the token is valid. Do not request a token on every call; tokens are valid for 12 hours.
  • Logging: log all received errors (code + message) for debugging and monitoring.
  • Mensajes al usuario: show clear, useful error messages (contact support or retry).