Show / Hide Table of Contents

Class ServiceApiException

ServiceApiException is thrown when an underlying service API call results in an error.

Inheritance
System.Object
System.Exception
ServiceApiException
Implements
System.Runtime.Serialization.ISerializable
Namespace: Adobe.PDFServicesSDK.exception
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class ServiceApiException : Exception, ISerializable

Constructors

ServiceApiException()

Constructs a ServiceApiException.

Declaration
public ServiceApiException()

ServiceApiException(String)

Constructs a ServiceApiException with the specified detail message.

Declaration
public ServiceApiException(string message)
Parameters
Type Name Description
System.String message

the detail message

ServiceApiException(String, Exception)

Constructs a ServiceApiException with the specified detail message and a reference to the inner exception that is the cause of this exception.

Declaration
public ServiceApiException(string message, Exception inner)
Parameters
Type Name Description
System.String message

the detail message

System.Exception inner

a reference to the inner exception

ServiceApiException(String, String, Int32)

Constructs a ServiceApiException with the specified detail message, requestId and returned HTTP status code.

Declaration
public ServiceApiException(string message, string requestId, int statusCode)
Parameters
Type Name Description
System.String message

the detail message

System.String requestId

X-Request-Id header value to track the request

System.Int32 statusCode

HTTP Status code returned in API response

ServiceApiException(String, String, Int32, Exception)

Constructs a ServiceApiException with the specified detail message, requestId, returned HTTP status code and a reference to the inner exception that is the cause of this exception.

Declaration
public ServiceApiException(string message, string requestId, int statusCode, Exception inner)
Parameters
Type Name Description
System.String message

the detail message

System.String requestId

X-Request-Id header value to track the request

System.Int32 statusCode

HTTP Status code returned in API response

System.Exception inner

a reference to the inner exception

ServiceApiException(String, String, Int32, String)

Constructs a ServiceApiException with the specified detail message, requestId, returned HTTP status code and error code.

Declaration
public ServiceApiException(string message, string requestId, int statusCode, string errorCode)
Parameters
Type Name Description
System.String message

the detail message

System.String requestId

X-Request-Id header value to track the request

System.Int32 statusCode

HTTP Status code returned in API response

System.String errorCode

Error code returned in API response

Properties

ErrorCode

Gets the error code of the response

Declaration
public string ErrorCode { get; }
Property Value
Type Description
System.String

RequestId

Gets the tracking id for the failed http request

Declaration
public string RequestId { get; }
Property Value
Type Description
System.String

StatusCode

Gets the http status code of the response

Declaration
public int StatusCode { get; }
Property Value
Type Description
System.Int32

Methods

ToString()

Returns the string reprensentation of ServiceApiException

Declaration
public override string ToString()
Returns
Type Description
System.String

the string reprensentation of ServiceApiException

Overrides
System.Exception.ToString()

Implements

System.Runtime.Serialization.ISerializable

See Also

SDKException
ServiceUsageException
In This Article
Back to top Copyright © 2020 Adobe. All rights reserved.