Documentation Index
Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt
Use this file to discover all available pages before exploring further.
Extended API error that encompasses both OpenAPI errors and other API-related errors
Extends
Constructors
Constructor
new APIError(
statusCode: number,
errorType: APIErrorType,
errorMessage: string,
correlationId?: string,
errorLink?: string,
cause?: Error): APIError;
Constructor for the APIError class
Parameters
| Parameter | Type | Description |
|---|
statusCode | number | The HTTP status code |
errorType | APIErrorType | The type of error |
errorMessage | string | The error message |
correlationId? | string | The correlation ID |
errorLink? | string | URL to documentation about this error |
cause? | Error | The cause of the error |
Returns
APIError
Overrides
Methods
toJSON()
toJSON(): {
errorLink?: string;
correlationId?: string;
name: string;
statusCode: number;
errorType: APIErrorType;
errorMessage: string;
};
Convert the error to a JSON object, excluding undefined properties
Returns
{
errorLink?: string;
correlationId?: string;
name: string;
statusCode: number;
errorType: APIErrorType;
errorMessage: string;
}
The error as a JSON object
| Name | Type |
|---|
errorLink? | string |
correlationId? | string |
name | string |
statusCode | number |
errorType | APIErrorType |
errorMessage | string |
Properties
| Property | Type |
|---|
statusCode | number |
errorType | APIErrorType |
errorMessage | string |
correlationId? | string |
errorLink? | string |