Skip to main content

ResponseWrapperErrorResponse

Generic API response wrapper for Error Response

statusstring

Response status

Possible values: [SUCCESS, ERROR]

Example: ERROR
messagestring

Message describing the response

Example: Request failed
codeMessagestring

Code message describing the response

Example: ERR-001
dataobjectnullable

Data payload (null for errors)

error objectnullable

Detailed error information

codestring

Error code

Example: ERR_GENERAL_0004
messagestring

Human-readable error message

Example: The requested resource was not found
details object[]

List of error details

  • Array [
  • codestring

    Specific error code

    Example: ER4001
    messagestring

    What went wrong

    Example: Invalid input
    targetstring

    Field that caused the issue

    Example: productCode
  • ]
  • suggestionsstring[]

    Suggested actions to resolve the error

    Example: ["Check the resource ID","Ensure the resource exists"]
    metaData object

    Additional metadata about the error

    property name*string
    timestampstring<date-time>

    Timestamp of when the response was generated

    Example: 2025-01-15T09:36:22.500Z
    ResponseWrapperErrorResponse
    {
    "status": "ERROR",
    "message": "Request failed",
    "codeMessage": "ERR-001",
    "data": {},
    "error": {
    "code": "ERR_GENERAL_0004",
    "message": "The requested resource was not found",
    "details": [
    {
    "code": "ER4001",
    "message": "Invalid input",
    "target": "productCode"
    }
    ],
    "suggestions": [
    "Check the resource ID",
    "Ensure the resource exists"
    ],
    "metaData": {}
    },
    "timestamp": "2025-01-15T09:36:22.500Z"
    }