If an API call cannot reach the Walmart gateway, a basic HTTP error code is returned (such as 503 Service Unavailable). However, if the gateway is reached, a full error response object is returned.
The error response message includes this information:
- The error code name, (e.g. INVALID_REQUEST).
- The HTTP status code, (e.g. 400, or 401).
- The reason for the error can be in either of these categories: Application, Data, or System.
- The severity of the error is either Info or Error.
- If the error response includes a field tag, it will be true of false.
Error Code | HTTP Status | Category | Severity | Field Included |
---|---|---|---|---|
SOME_CONTENT_NOT_FOUND | 206 | Application | ||
INVALID_REQUEST | 400 | Data | Error | true |
INVALID_REQUEST_HEADER | 400 | Data | Error | true |
INVALID_REQUEST_PARAM | 400 | Data | Error | true |
INVALID_REQUEST_CONTENT | 400 | Data | Error | true |
MISSING_REQUEST_HEADER | 400 | Data | Error | true |
MISSING_REQUEST_PARAM | 400 | Data | Error | true |
MALFORMED_REQUEST_CONTENT | 400 | Data | Error | true |
UNAUTHORIZED | 401 | Data | Error | false |
FORBIDDEN.GMP_GATEWAY_API | 403 | Data | Error | false |
CONTENT_NOT_FOUND | 404 | Application | Info | false |
URI_NOT_FOUND | 404 | Data | Error | false |
METHOD_NOT_ALLOWED | 405 | Data | Error | false |
INVALID_ACCEPT_TYPE | 406 | Application | Error | false |
UNSUPPORTED_MEDIA_TYPE | 415 | Data | Error | false |
RESOURCE_IS_LOCKED.GMP_RECEIVER_API | 423 | Application | Error | false |
REQUEST_THRESHOLD_VIOLATED | 429 | Request | Error | false |
INVALID_SYSTEM_STATE | 500 | System | Error | false |
SYSTEM_ERROR | 500 | System | Error | false |
DOWNSTREAM_SYSTEM_TIME_OUT | 504 | System | Error | false |
As an example, in the last error object on the right, the overall error is an INVALID_REQUEST_HEADER error encountered when invoking the GMP_ORDER_API. The error is a DATA ERROR in the WM_QOS.CORRELATION_ID field (a request header), and it is set to null or blank.
Sample Errors Object
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>
<code>INVALID_REQUEST_HEADER.GMP_ORDER_API</code>
<field>WM_SVC.ENV</field>
<description>WM_SVC.ENV set blank or null</description>
<info>One or more request headers are invalid.</info>
<severity>ERROR</severity>
<category>DATA</category>
<causes></causes>
<errorIdentifiers></errorIdentifiers>
</error>
<error>
<code>INVALID_REQUEST_HEADER.GMP_ORDER_API</code>
<field>WM_CONSUMER.ID</field>
<description>WM_CONSUMER.ID set blank or null</description>
<info>One or more request headers are invalid.</info>
<severity>ERROR</severity>
<category>DATA</category>
<causes></causes>
<errorIdentifiers></errorIdentifiers>
</error>
<error>
<code>INVALID_REQUEST_HEADER.GMP_ORDER_API
</code>
<field>WM_SVC.NAME</field>
<description>WM_SVC.NAME set blank or null</description>
<info>One or more request headers are invalid.</info>
<severity>ERROR</severity>
<category>DATA</category>
<causes></causes>
<errorIdentifiers></errorIdentifiers>
</error>
<error>
<code>INVALID_REQUEST_HEADER.GMP_ORDER_API</code>
<field>WM_QOS.CORRELATION_ID</field>
<description>WM_QOS.CORRELATION_ID set blank or null
</description>
<info>One or more request headers are invalid.</info>
<severity>ERROR</severity>
<category>DATA</category>
<causes></causes>
<errorIdentifiers></errorIdentifiers>
</error>
</errors>