What you will receive
An
application/problem+json response is an RFC 9457 problem details object. Any other media type is not, and the shape it carries differs between APIs. Your API reference carries an Error handling page that names the shape that API answers.
type– A URI reference that identifies the error type.title– A short summary of the problem type.status– The HTTP status code.detail– Guidance specific to this occurrence.code– A stable identifier for the error. Use this field for programmatic handling.errors– Optional list of per-field detail, each entry with alocationand amessage.instance– Optional URI reference for this specific occurrence.
Error codes
Code shape varies by API. You will meet a prefixed
<PREFIX>-<NNNN>, a bare number, a lowercase
token, and a code that a rail’s counterparty assigned. Midaz core uses bare numbers such as 0002
and 0009.
Your API reference carries an Error handling page that names the shape that API uses and lists
the codes it emits.
HTTP status codes
These are the status codes you will meet most often. An API can answer others, and its own Error handling page lists them.
Retry guidance
You should not retry every error. The following table helps you decide:
Exponential backoff strategy
For retryable errors, use exponential backoff to avoid overwhelming the service:- First retry: Wait 1 second
- Second retry: Wait 2 seconds
- Third retry: Wait 4 seconds
- Maximum retries: Stop after 3–5 attempts
- Jitter: Add a small random delay (0–500ms) to each wait to prevent thundering herd
Troubleshooting by category
Missing or invalid fields (400)
A400 response can carry field-level detail that names the fields at fault.
Common causes:
- Required field omitted from the request body
- Field value does not match the expected type (e.g., string instead of UUID)
- Field value exceeds maximum length
- Unexpected extra fields in the request body
- Read the field-level detail in the error response
- Compare your request against the API reference for that endpoint
Authentication and authorization (401/403)
Common causes:- Missing
Authorizationheader - Expired or revoked token
- Token does not grant access to the requested endpoint
- Confirm that your environment has Access Manager enabled
- Verify the token is present in the
Authorizationheader - Request a new token if the current one has expired
- Check that the token’s scope includes the required permissions
Resource not found (404)
Common causes:- Incorrect resource ID in the URL path
- Resource was soft-deleted
- Resource belongs to a different organization or ledger
- Verify the resource ID in the URL path
- List resources to confirm the ID exists
- Check that you use the correct
organizationIdandledgerIdpath parameters
Conflict errors (409)
Common causes:- Creating a resource with a name that already exists (e.g., duplicate ledger name, duplicate rule name)
- Attempting an operation that is already complete (e.g., duplicate transaction)
- Read the error message to identify which field caused the conflict
- Use a different value (e.g., rename) or retrieve the existing resource instead
- For idempotent operations, verify the existing resource matches your intent
Rate limiting (429)
Common causes:- Too many requests in a short period
- Implement exponential backoff with jitter
- Reduce the frequency of API calls
- Batch operations where possible
Server and timeout errors (500/502/503/504)
Common causes:- Temporary service disruption
- High load on the platform
- Upstream dependency unavailable
- Retry reads with exponential backoff (1s, 2s, 4s). Reconcile commands before retrying them, because the original outcome can be unknown.
- If the error persists after 3–5 retries, contact support
- Log a redacted error response for support escalation
Service-specific error lists
Every API reference carries an Error handling page. Use it to look up a code you received. Products
Brazil Rails
The SPI error list documents the native SPI rail contract. It is not the Pix Lerian v1.0.0 integration lane: use the Pix Lerian error list for the application plugin and mock-provider integration/testing surface. The native SPI connector is not available for use in this release.
Interfaces
Platform
Best practices
1. Use error codes for programmatic handling
Error codes are stable identifiers for automation. Map specific codes to resolution paths in your integration:2. Log errors with context
Log the operation, timestamp, status, stable error code, and a redacted response. Do not log credentials, bearer tokens, personal data, or sensitive request fields. This keeps support context useful without copying secrets or PII into logs.3. Handle field-level errors
When the response carries field-level detail, surface those messages to your users rather than a generic error. The member that carries it differs by API. Each error list page names the member its API sends.4. Implement circuit breakers for integrations
If you receive repeated500, 502, or 503 errors, use a circuit breaker pattern to temporarily stop calling the failing service and prevent cascading failures.

