m2pfintech
Error Reference

Error Reference

Complete error code reference — API errors by service, transaction decline codes, and status codes.

DCMS uses structured error responses to help you diagnose and handle failures programmatically. Every error includes a machine-readable code and a human-readable message.


Error Response Format

All errors follow the standard envelope:

Error Response
{
  "result": null,
  "exception": {
    "errorCode": "card.not.found",
    "errorMessage": "No card found for the given entity and kit"
  }
}
FieldTypeDescription
errorCodestringMachine-readable error identifier (dot-notation)
errorMessagestringHuman-readable description

Always check the exception field — even on HTTP 200 responses. Some business-level errors return 200 with a populated exception object.


Error Handling Best Practices

  1. Match on errorCode — not on errorMessage (messages may change)
  2. Retry on 5xx — use exponential backoff with jitter
  3. Do not retry on 4xx — fix the request before resending
  4. Log the full response — including headers and request ID for support
  5. Map to user-friendly messages — never show raw error codes to end users

On this page