Table of Contents

Class OpaError

Namespace
Styra.Opa
Assembly
Styra.Opa.dll
public class OpaError
Inheritance
OpaError
Inherited Members

Constructors

OpaError()

public OpaError()

OpaError(ServerErrorWithStatusCode)

public OpaError(ServerErrorWithStatusCode err)

Parameters

err ServerErrorWithStatusCode

OpaError(ServerError)

public OpaError(ServerError err)

Parameters

err ServerError

Properties

Code

The short-form category of error, such as "internal_error", "invalid_policy_or_data", etc.

[JsonProperty("code")]
public string Code { get; set; }

Property Value

string

DecisionId

If decision logging is enabled, this field contains a string that uniquely identifies the decision. The identifier will be included in the decision log event for this decision. Callers can use the identifier for correlation purposes.

[JsonProperty("decision_id")]
public string? DecisionId { get; set; }

Property Value

string

HttpStatusCode

The HTTP status code for the request. Limited to "200" or "500".

[JsonProperty("http_status_code")]
public string? HttpStatusCode { get; set; }

Property Value

string

Message

The long-form error message from the OPA instance, describing what went wrong.

[JsonProperty("message")]
public string Message { get; set; }

Property Value

string

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

explicit operator OpaError(ServerErrorWithStatusCode)

public static explicit operator OpaError(ServerErrorWithStatusCode e)

Parameters

e ServerErrorWithStatusCode

Returns

OpaError

explicit operator OpaError(ServerError)

public static explicit operator OpaError(ServerError e)

Parameters

e ServerError

Returns

OpaError