Class Abort
Abort specification is used to prematurely abort a request with a pre-specified error code. The following example will return an HTTP 400 error code for 1 out of every 1000 requests to the “ratings” service “v1”.
Namespace: Neon.Kube.Resources.Istio
Assembly: Neon.Kube.Resources.dll
Syntax
public class Abort
Constructors
Abort()
Initializes a new instance of the HTTPFaultInjection.Abort class.
Declaration
public Abort()
Properties
HTTPStatus
HTTP status code to use to abort the Http request.
Declaration
[JsonProperty(PropertyName = "httpStatus", Required = Required.Always, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int HTTPStatus { get; set; }
Property Value
Type | Description |
---|---|
int |
Percentage
Percentage of requests to be aborted with the error code provided.
Declaration
[JsonProperty(PropertyName = "percentage", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Percent Percentage { get; set; }
Property Value
Type | Description |
---|---|
Percent |
Methods
Validate()
Validate the object.
Declaration
public virtual void Validate()
Exceptions
Type | Condition |
---|---|
ValidationException | Thrown if validation fails. |