Legacy Error Formats

Overview

If an API call requires the X-PB-UnifiedErrorStructure header in order to return the standard error object, the API will return one of the following legacy formats if the header is left out or set to false.

Legacy Error Format 1

This legacy format returns the following types of errors:

The error returns the following fields. The error might not return all fields:

Field

Type

Description

errorCode

String

The error code.

message

String

Optional. The reason for the failure.

additionalInfo

String

Optional. Additional information associated with the failure.

parameters

array[String]

Optional. The fields that might be incorrect in the request.

moreInfo

String

Optional. Link to the error documentation.

supplementaryErrorCode

String

Optional. Error code for identifying the field that caused error.

Example

[
    {
        "errorCode": "1021141",
        "message": "Invalid combination of Service Id and Parcel type.",
        "additionalInfo": "Invalid Combination of service, option and rate type. (NAE)"
    }
]

Legacy Error Format 2

This legacy format returns the following types of errors:

The error returns the following fields. The error might not return all fields:

Field

Type

Description

status

String

This is always set to ERROR.

errors

Array[Object]

Contains the error.

errors.errorCode

String

The error code.

errors.errorDescription

String

The reason for the failure.

errors.userMessage

String

Any error information sent by the carrier.

Example

{
    "status": "ERROR",
    "errors": [
        {
            "errorCode": "40000072",
            "errorDescription": "Invalid value for renderType."
        }
    ]
}

Legacy Error Format 3

This legacy format returns Lowercase Error Codes. The error returns the following fields:

Field

Type

Description

key

String

The error code.

message

String

The reason for the failure.

Example

[
    {
        "key": "address.not.verified",
        "message": "Address could not be verified!"
    }
]

Legacy Error Format 4

This legacy format returns Lowercase Error Codes. The error returns the following fields:

Field

Type

Description

errorCode

String

The error code.

errorMessage

String

The reason for the failure.

invalidFields

String

List of fields in the request that might be incorrect.

Example

[
    {
        "errorCode": "invalid.date.time",
        "errorMessage": "Provided Date/time ___ is invalid, valid format is YYYY-MM-DDThh:mm:ss.sZ",
        "invalidFields": null
    }
]