simulate_​error_​code

Version: v2025-01-13Includes use: Yes

Behavior name: Simulate Error Response Code

This behavior simulates various error response codes. Contact Akamai Professional Services for help configuring it.

Default behavior

These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.

data "akamai_property_rules_builder" "simulate_error_code" {
  rules_v2025_02_18 {
    name     = "Simulate Error Response Code"
    comments = "Simulates various error response codes."
    behavior {
      simulate_error_code {
        error_type = "simulateErrorCode"
        timeout    = "5s"
      }
    }
  }
}
"behaviors": [
  {
    "name": "simulateErrorCode",
    "options": {
      "errorType": "ERR_DNS_TIMEOUT",
      "timeout": "5s"
    }
  }
]

Options

Option Description
error_​type
Specifies the type of error. Value is one of:
  • ERR_CONNECT_FAIL
  • ERR_CONNECT_TIMEOUT
  • ERR_DNS_FAIL
  • ERR_DNS_IN_REGION
  • ERR_DNS_TIMEOUT
  • ERR_NO_GOOD_FWD_IP
  • ERR_READ_ERROR
  • ERR_READ_TIMEOUT
  • ERR_SUREROUTE_DNS_FAIL
  • ERR_WRITE_ERROR
timeout
Generates an error after the specified amount of time from the initial request.