Class RequestFailedException
A base exception type for failed requests.
Implements
Inherited Members
Namespace: Unity.Services.Core
Assembly: Unity.Services.Core.dll
Syntax
public class RequestFailedException : Exception, ISerializable
Constructors
RequestFailedException(int, string)
Creates an exception.
Declaration
public RequestFailedException(int errorCode, string message)
Parameters
Type | Name | Description |
---|---|---|
int | errorCode | The error code returned by the service. |
string | message | A message describing the error. |
Remarks
The exception message is typically the "detail" field from the error response returned by the service when it is available.
The error code is the "code" field from the error response returned by the service when it is available. See CommonErrorCodes for common error codes.
RequestFailedException(int, string, Exception)
Creates an exception.
Declaration
public RequestFailedException(int errorCode, string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
int | errorCode | The error code returned by the service. |
string | message | A message describing the error. |
Exception | innerException | The inner exception reference. |
Remarks
The exception message is typically the "detail" field from the error response returned by the service when it is available.
The error code is the "code" field from the error response returned by the service when it is available. See CommonErrorCodes for common error codes.
Properties
ErrorCode
Gets the error code for the failure.
Declaration
public int ErrorCode { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
See CommonErrorCodes for common error codes. Consult the service documentation for specific error codes various APIs can return.