Skip to main content

Validation suite tests for error responses

The validation suite tests your integration against a number of error demo_result values. Your integration should return the appropriate error responses to these tests.

The following error demo_result values are used:

  • ERROR_INVALID_CREDENTIALS

  • ERROR_ANY_PROVIDER_MESSAGE

  • ERROR_CONNECTION_TO_PROVIDER

  • UHJWO_RWFG_FRJUKY_ZKBC_MQQKBQ or any other random letter and underscore string

Depending on the error demo_result value, this determines which error response is expected.

The associated error response type for these errors are as follows:

  • ERROR_INVALID_CREDENTIALSINVALID_CREDENTIALS

  • ERROR_ANY_PROVIDER_MESSAGEPROVIDER_MESSAGE

  • ERROR_CONNECTION_TO_PROVIDERPROVIDER_CONNECTION

  • UHJWO_RWFG_FRJUKY_ZKBC_MQQKBQUNSUPPORTED_DEMO_RESULT

Note that if the demo_result value is a random string, you should use the UNSUPPORTED_DEMO_RESULT error type response.

The response should be in the following format, with the error type set to the associated type to the error demo_result value.

Note

Despite being error responses, response codes should always be 200.

The following example response would be a valid response to the demo_result value of ERROR_ANY_PROVIDER_MESSAGE.

{
    "errors": [
        {
            "type": "PROVIDER_MESSAGE",
            "message": "API is not available at this time. Please try again later."
        }
    ],
    "warnings": []
}

Additional information