No results for

Powered byAlgolia

A HTTP Fault describes the characteristics of the faults to be injected in the HTTP requests served by a target.

A HTTP fault is described by the following attributes:

AttributeDescription
averageDelayaverage delay added to requests in milliseconds (default 0ms)
delayVariationvariation in the injected delay in milliseconds (default 0ms)
errorBodybody to be returned when an error in injected
errorCodeerror code to return
errorRaterate of requests that will return an error, represented as a float in the range 0.0 to 1.0 (default 0.0)
excludecomma-separated list of urls to be excluded from disruption (e.g. /health)
portport on which the requests will be intercepted
note

averageDelay and delayVariation are applied to all requests affected by the fault, regardless of the value of errorRate. errorCode is returned only to a fraction of requests defined by errorRate.

Example

This example defines a HTTP fault that introduces a delay of 50ms in all requests and returns an error code 500 in 10% of the requests.

const fault = {
average_delay: 50,
error_code: 500,
error_rate: 0.1,
};