docs.unity.cn
    Show / Hide Table of Contents

    Class RequestFailedException

    A base exception type for failed requests.

    Inheritance
    Object
    RequestFailedException
    Namespace: Unity.Services.Core
    Syntax
    public class RequestFailedException : Exception

    Constructors

    RequestFailedException(Int32, String)

    Creates an exception.

    Declaration
    public RequestFailedException(int errorCode, string message)
    Parameters
    Type Name Description
    Int32 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(Int32, String, Exception)

    Creates an exception.

    Declaration
    public RequestFailedException(int errorCode, string message, Exception innerException)
    Parameters
    Type Name Description
    Int32 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
    Int32
    Remarks

    See CommonErrorCodes for common error codes. Consult the service documentation for specific error codes various APIs can return.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, April 26, 2022
    Terms of use