Errors
Errors raised by configuration, API, and command operations.
RuntaError
Section titled “RuntaError”Base error for failures raised by the Runta SDK.
RuntaError declaration
Section titled “RuntaError declaration”class RuntaError extends ErrorRuntaError construction
Section titled “RuntaError construction”new RuntaError(message: string): RuntaErrorParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
message | string | Required | Human-readable error message. |
Returns
Section titled “Returns”RuntaError
ConfigError
Section titled “ConfigError”Raised when required SDK configuration is missing or invalid.
ConfigError declaration
Section titled “ConfigError declaration”class ConfigError extends RuntaErrorConfigError construction
Section titled “ConfigError construction”new ConfigError(message: string): ConfigErrorParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
message | string | Required | Human-readable error message. |
Returns
Section titled “Returns”ConfigError
ApiError
Section titled “ApiError”Raised when the Runta API returns an unsuccessful response.
ApiError declaration
Section titled “ApiError declaration”class ApiError extends RuntaErrorApiError construction
Section titled “ApiError construction”new ApiError(message: string, options: { code?: string; statusCode?: number } = {}): ApiErrorParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
message | string | Required | Human-readable error message. |
options | { code?: string; statusCode?: number } | {} | Options that control the operation. |
Returns
Section titled “Returns”ApiError
ApiError properties
Section titled “ApiError properties”| Name | Type | Description |
|---|---|---|
code | string | undefined | Runta API error code, when available. |
statusCode | number | undefined | HTTP status code, when available. |
ApiError methods
Section titled “ApiError methods”toString()
Section titled “toString()”Format the HTTP status, API code, and message.
ApiError.toString(): stringReturns
Section titled “Returns”string
CommandError
Section titled “CommandError”Raised when a runtime command fails under strict execution behavior.
CommandError declaration
Section titled “CommandError declaration”class CommandError extends RuntaErrorCommandError construction
Section titled “CommandError construction”new CommandError(message: string, options: { exitCode?: number } = {}): CommandErrorParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
message | string | Required | Human-readable error message. |
options | { exitCode?: number } | {} | Options that control the operation. |
Returns
Section titled “Returns”CommandError
CommandError properties
Section titled “CommandError properties”| Name | Type | Description |
|---|---|---|
exitCode | number | undefined | Command exit code, when available. |