Simulating errors

📘

About this guide

This guide enables you to simulate errors that may be thrown in the process of interacting with Demyst and underlying upstream sources. This simulation option will allow you to see what the expected behaviour of an error looks like.

JSON Syntax

Simulation section

  • A JSON object from a connector to an error type

Example

"simulation": {  
  "acxiom_place": "upstream_structure",  
  "hazardhub_risks_and_enhanced_property2": "upstream_http"  
}

Per Provider

For each provider in the request, you can simulate an error without having to add simulate option separately. The error in the response will remain the same

  • Syntax: A JSON object from error_simulation to an error type within the provider object
  • Returns: type and message for the error raised.

Example

"providers": {
  "equifax_austin_tetra_discovery": {
        "error_simulation": "upstream_structure",
        "version": "$latest"
      },
  "acxiom_place": {
    	"error_simulation": "upstream_http",
      "version": "$latest"
  }
}

Error library

Below is a reference of all the errors that can be simulated, along with a brief description of when they might come into play.

Error typeDescription
upstream_structureXML/JSON parsing failure, unexpected elements in upstream response, or an unexpected upstream structure
upstream_httpServer error from the provider, for example - HTTP status code 500 unexpected
insufficient_credentialsThe data provider(s) you tried to reach did not receive sufficient valid credentials to execute.
invalid_credentialsThe credentials either provided by the client or by Demyst to access a particular data provider are incorrect or out of date.
upstream_service_unavailableThe credentials either provided by the client or by Demyst to access a particular data provider are incorrect or out of date.
rate_limit_exceededProviders having monthly / concurrency rate limit, if any, exceeded
sample_data_not_implementedThe provider does not have SampleData and errors out using test key/sample mode
unexpected_provider_errorThe data provider you are attempting to access threw an unexpected error.
timeoutTimeout exceeded. The default timeout is 100 seconds, but this can be extended