Class ErrorDto
- Namespace
- Breeze.AspNetCore
- Assembly
- Breeze.AspNetCore.NetCore.dll
Error object returned to the client, as an RFC 9457 problem details document.
[JsonObject(IsReference = false)]
public class ErrorDto
- Inheritance
-
ErrorDto
- Inherited Members
Remarks
IsReference = false keeps Newtonsoft's $id out of the document. The global
settings turn on PreserveReferencesHandling.Objects and TypeNameHandling.Objects
because entity payloads need $id/$ref for object graphs and $type for
inheritance; an error document needs neither. $type still appears, since suppressing it
for one type would take a custom converter - it is a harmless RFC 9457 extension member that a
problem+json consumer ignores, but it does name the assembly.
Properties
Code
HTTP status code. The same value as Status; pre-3.0 clients read this.
[JsonProperty("Code", NullValueHandling = NullValueHandling.Ignore)]
public int? Code { get; set; }
Property Value
- int?
Detail
Explanation specific to this occurrence (RFC 9457 "detail")
[JsonProperty("detail")]
public string? Detail { get; set; }
Property Value
EntityErrors
Entity validation errors; null unless the exception was an EntityErrorsException
[JsonProperty("EntityErrors", NullValueHandling = NullValueHandling.Ignore)]
public List<EntityError>? EntityErrors { get; set; }
Property Value
Message
Exception message. The same value as Detail; pre-3.0 clients read this.
[JsonProperty("Message", NullValueHandling = NullValueHandling.Ignore)]
public string? Message { get; set; }
Property Value
ProblemEntityErrors
Entity validation errors, as an RFC 9457 extension member. Used instead of EntityErrors when IncludeLegacyErrorMembers is false.
[JsonProperty("entityErrors", NullValueHandling = NullValueHandling.Ignore)]
public List<EntityError>? ProblemEntityErrors { get; set; }
Property Value
StackTrace
Exception stack trace. Omitted unless IncludeStackTraceInErrors is set.
[JsonProperty("StackTrace", NullValueHandling = NullValueHandling.Ignore)]
public string? StackTrace { get; set; }
Property Value
Status
HTTP status code (RFC 9457 "status")
[JsonProperty("status")]
public int Status { get; set; }
Property Value
Title
Short, human-readable summary of the problem type (RFC 9457 "title")
[JsonProperty("title")]
public string? Title { get; set; }
Property Value
Type
URI identifying the problem type (RFC 9457 "type")
[JsonProperty("type")]
public string? Type { get; set; }
Property Value
Methods
ToString()
Return ErrorDto as JSON
public override string ToString()