Class Error
Schema to an API call when returning a status, title, and details about an error.
Inherited Members
Namespace: Unity.Services.Apis.Friends
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "Error")]
[Preserve]
public class Error
Constructors
Error(int, string, string, List<Detail>, int, string, string)
Initializes a new instance of the Error class.
Declaration
[Preserve]
public Error(int status = 0, string title = null, string detail = null, List<Detail> details = null, int code = 0, string type = null, string requestID = null)
Parameters
Type | Name | Description |
---|---|---|
int | status | Indicates the HTTP status code of the response. (required). |
string | title | Title of the response. (required). |
string | detail | Details about the response. (required). |
List<Detail> | details | Array with details about all the internal validation errors with information including unique validation error code number and validation error message.. |
int | code | An integer in the range of 24000-24999 (required). |
string | type | The type of error (required). |
string | requestID | A unique ID for this request (required). |
Properties
Code
An integer in the range of 24000-24999
Declaration
[DataMember(Name = "code", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public int Code { get; set; }
Property Value
Type | Description |
---|---|
int | An integer in the range of 24000-24999 |
Detail
Details about the response.
Declaration
[DataMember(Name = "detail", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Detail { get; set; }
Property Value
Type | Description |
---|---|
string | Details about the response. |
Details
Array with details about all the internal validation errors with information including unique validation error code number and validation error message.
Declaration
[DataMember(Name = "details", EmitDefaultValue = false)]
[Preserve]
public List<Detail> Details { get; set; }
Property Value
Type | Description |
---|---|
List<Detail> | Array with details about all the internal validation errors with information including unique validation error code number and validation error message. |
RequestID
A unique ID for this request
Declaration
[DataMember(Name = "requestID", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string RequestID { get; set; }
Property Value
Type | Description |
---|---|
string | A unique ID for this request |
Status
Indicates the HTTP status code of the response.
Declaration
[DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public int Status { get; set; }
Property Value
Type | Description |
---|---|
int | Indicates the HTTP status code of the response. |
Title
Title of the response.
Declaration
[DataMember(Name = "title", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Title { get; set; }
Property Value
Type | Description |
---|---|
string | Title of the response. |
Type
The type of error
Declaration
[DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
string | The type of error |