Class ErrorDetails

Describes an HTTP error in a structured, serializer-agnostic format.

Inheritance
object
ErrorDetails
Inherited Members
object.GetType()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: NanoRoute
Assembly: NanoRoute.dll
Syntax
public sealed class ErrorDetails
Remarks

Instances of this type can be serialized to JSON, XML, or any other format chosen by the caller. NanoRoute's JSON helpers use it as the default payload shape for error responses.

Constructors

ErrorDetails()

Declaration
public ErrorDetails()

Properties

DeveloperMessages

Messages to the devs (may contain sensitive information). Should NOT be set in production environment.

Declaration
public IEnumerable<string>? DeveloperMessages { get; init; }
Property Value
Type Description
IEnumerable<string>

Errors

Detailed error information (should NOT contain sensitive information).

Declaration
public IEnumerable<string>? Errors { get; init; }
Property Value
Type Description
IEnumerable<string>

Status

HTTP status code.

Declaration
public required HttpStatusCode Status { get; init; }
Property Value
Type Description
HttpStatusCode

Title

Short, human readable description of the error.

Declaration
public required string Title { get; init; }
Property Value
Type Description
string

TraceId

Unique identifier of the request (logs entries should contain the same id).

Declaration
public required string TraceId { get; init; }
Property Value
Type Description
string
In this article
Back to top Generated by DocFX