Class.SdkError
Class representing an SDK-specific error.
The SdkError class extends the KeybanError to provide detailed error information
based on predefined SdkErrorCode. It facilitates consistent error handling across
the Keyban SDK by categorizing errors and providing meaningful messages.
Extends
Constructors
Constructor
new SdkError(message?: string, options?: ErrorOptions & {
code?: SdkErrorCode;
}): SdkError;
Parameters
| Parameter | Type |
|---|---|
message? | string |
options? | ErrorOptions & { code?: SdkErrorCode; } |
Returns
SdkError
Inherited from
Properties
| Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
|---|---|---|---|---|---|---|
code? | public | SdkErrorCode | undefined | - | - | KeybanError.code |
name | public | string | "SdkError" | - | KeybanError.name | - |
codes | static | typeof SdkErrorCode | SdkErrorCode | The available SDK error types. | - | - |
Methods
fromCode()
static fromCode(code: SdkErrorCode, options?: ErrorOptions): SdkError;
Parameters
| Parameter | Type |
|---|---|
code | SdkErrorCode |
options? | ErrorOptions |
Returns
SdkError