Skip to content

Errors

Errors raised by configuration, API, and command operations.

Base error for failures raised by the Runta SDK.

class RuntaError extends Error
new RuntaError(message: string): RuntaError
Name Type Default Description
message string Required Human-readable error message.
  • RuntaError

Raised when required SDK configuration is missing or invalid.

class ConfigError extends RuntaError
new ConfigError(message: string): ConfigError
Name Type Default Description
message string Required Human-readable error message.
  • ConfigError

Raised when the Runta API returns an unsuccessful response.

class ApiError extends RuntaError
new ApiError(message: string, options: { code?: string; statusCode?: number } = {}): ApiError
Name Type Default Description
message string Required Human-readable error message.
options { code?: string; statusCode?: number } {} Options that control the operation.
  • ApiError
Name Type Description
code string | undefined Runta API error code, when available.
statusCode number | undefined HTTP status code, when available.

Format the HTTP status, API code, and message.

ApiError.toString(): string
  • string

Raised when a runtime command fails under strict execution behavior.

class CommandError extends RuntaError
new CommandError(message: string, options: { exitCode?: number } = {}): CommandError
Name Type Default Description
message string Required Human-readable error message.
options { exitCode?: number } {} Options that control the operation.
  • CommandError
Name Type Description
exitCode number | undefined Command exit code, when available.