CursorCliSdk.Error exception (CursorCliSdk v0.2.0)

Copy Markdown View Source

Unified error type for Cursor CLI SDK operations.

Summary

Types

t()

@type t() :: %CursorCliSdk.Error{
  __exception__: true,
  cause: term(),
  context: map() | nil,
  details: String.t() | nil,
  exit_code: integer() | nil,
  kind: atom(),
  message: String.t()
}

Functions

from_exit_code(code)

@spec from_exit_code(integer()) :: :ok | t()

from_runtime_failure(failure, opts \\ [])

@spec from_runtime_failure(
  CliSubprocessCore.ProviderCLI.ErrorRuntimeFailure.t(),
  keyword()
) :: t()

new(opts)

@spec new(keyword()) :: t()

normalize(error, opts)

@spec normalize(
  term(),
  keyword()
) :: t()