The standard Commerce Cloud format for REST errors includes the following fields in the response:

For example:

{
    "message": "Required header is missing: x-ccasset-language",
    "status": "400",
    "errorCode": "82001"
}

Some errors use the multiple-error format instead, which encapsulates one or more errors in an errors array object. Each entry in the array is a separate error, with its own message, status, and errorCode values. In addition, the format includes top-level message and status values that apply globally to all of the errors. For example:

{
    "message": "Error while retrieving the products",
    "errors": [
        {
            "message": "Product Id xprod100 is invalid or non-existent.",
            "status": "400",
            "errorCode": "20031",
        },
        {
            "message": "Product Id xprod102 is invalid or non-existent.",
            "status": "400",
            "errorCode": "20031",
        }
    ],
    "status": "400"
}

Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices