Errors reference

All error responses returned by our APIs follow the following JSON format.

Field Descriptions

FieldTypeDescription
error_codestringUnique identifier for the specific error case, used programmatically
error_typestringCategory of the error (e.g., validation, authentication, internal_error)
messagestringHuman-readable message describing the error
detailsarray(Optional) List of field-specific validation errors
details[].fieldstringName of the field that caused the error
details[].descriptionstringDescription of what went wrong with that field
trace_idstring(Optional) Unique identifier for tracing the request across services

Example

Basic response

{
  "error_code": "service_unavailable",
  "error_type": "internal_error",
  "message": "an unexpected error occurred"
}

Full response

{
  "error_code": "invalid_request",
  "error_type": "validation",
  "message": "invalid request data",
  "details": [
    {
      "field": "instrument_id",
      "description": "invalid instrument_id format"
    }
  ],
  "trace_id": "trx-123"
}

Error codes

error_codeHTTP StatusDescription
service_unavailable503The service is temporarily down or overloaded
internal_server_error500An unexpected internal error occurred
resource_not_found404The requested resource was not found
invalid_request400The request is malformed or contains invalid data
unauthorized_request401The request lacks valid authentication credentials
resource_locked423The resource is currently locked due to a concurrent op

Error types

error_typeDescriptionTypical Scenario
internal_errorGeneric internal server error, unexpected and not recoverable by the clientServer bug, panic, or unknown exception
unavailableThe service is temporarily unavailable or under maintenanceService overload, dependency failure
unauthorizedMissing or invalid authenticationNo token, invalid credentials
not_foundRequested entity or resource doesn't existID does not match a stored resource
validationOne or more input fields are invalidMissing required fields, wrong types
concurrencyA resource is locked or being processed in parallelConcurrent modification, distributed locking
logo akua

© Akua 2025 - Todos los derechos reservados