TXDataServerError Class
Describes an error that the server sends to the client as an error response.
Remarks
The error is written in the response body as a JSON object with an error member holding the code, the message and, when present, the errors array with the detailed errors.
Syntax
Unit: XData.Payload.Writer
TXDataServerError = class(TObject);
Constructors
| Name | Description |
|---|---|
| Create | Creates an empty error description. |
Properties
| Name | Description |
|---|---|
| ErrorCode | Gets or sets the code that identifies the error, sent as the code member. |
| ErrorMessage | Gets or sets the error message, sent as the message member. |
| Errors | Gets the list of detailed errors, sent as the errors array. |
| StatusCode | Gets or sets the HTTP status code of the error response. |