Content Gateway Errors

View as Markdown

Gateway Errors

All gateways should expose the following error codes to Moveworks. The error code and message format should follow exactly as below. The API gateway should make limited-to-no changes to error messages exposed by underlying systems.

Error Response Format
1{
2 "error": {
3 "code": "ERROR_CODE_IDENTIFIER",
4 "message": "Description of the error."
5 }
6}

Error Codes

400 INPUT_VALIDATION_FAILED

Moveworks submitted an invalid request to the gateway.

1{
2 "error": {
3 "code": "INPUT_VALIDATION_FAILED",
4 "message": "Mandatory field not provided: submitted_by."
5 }
6}

401 AUTHENTICATION_FAILED

The provided credential by Moveworks is invalid or missing. This is NOT the same as authentication failing between the gateway and your downstream systems.

1{
2 "error": {
3 "code": "AUTHENTICATION_FAILED",
4 "message": "Bearer token missing."
5 }
6}

404 NOT_FOUND

The resource identifier Moveworks is requesting is missing.

1{
2 "error": {
3 "code": "NOT_FOUND",
4 "message": "Form ID 222 does not exist."
5 }
6}

429 RATE_LIMIT_EXCEEDED

Moveworks has exceeded the allowable number of requests per minute.

1{
2 "error": {
3 "code": "RATE_LIMIT_EXCEEDED",
4 "message": "Rate limit exceeded."
5 }
6}

All responses should include the following headers indicating rate limit consumption:

Rate Limit Headers
1X-RateLimit-Limit: 600 # Max requests permitted per minute
2X-RateLimit-Remaining: 421 # Requests remaining in current window
3X-RateLimit-Reset: 18 # Seconds until rate limit fully resets

500 INTERNAL_SERVER_ERROR

Something went wrong in the gateway and threw an exception.

1{
2 "error": {
3 "code": "INTERNAL_SERVER_ERROR",
4 "message": "NoneType has no attribute 'records'"
5 }
6}

502 EXTERNAL_REST_ERROR

Something went wrong between the gateway and your system. Should include the raw response from the source system’s error.

1{
2 "error": {
3 "code": "EXTERNAL_REST_ERROR",
4 "message": "Service Cloud rejected the request. Raw response: SOQL insertion failed. Can not set Case Owner to Contact record."
5 }
6}