rocksky/error

Types

Errors returned by Rocksky SDK calls.

pub type RocksyError {
  TransportError(message: String)
  HttpStatusError(status: Int, body: String)
  XrpcError(
    status: Int,
    name: String,
    message: option.Option(String),
  )
  DecodeError(errors: List(decode.DecodeError))
  InvalidInput(message: String)
}

Constructors

  • TransportError(message: String)

    Underlying transport failure (DNS, TCP, TLS, etc.).

  • HttpStatusError(status: Int, body: String)

    The server returned an HTTP status outside 2xx but did not give a well-formed XRPC error body. The raw status and body are preserved.

  • XrpcError(
      status: Int,
      name: String,
      message: option.Option(String),
    )

    The server returned a structured XRPC error.

  • DecodeError(errors: List(decode.DecodeError))

    The response body could not be decoded into the expected type.

  • InvalidInput(message: String)

    Some required input is missing or malformed before the call is even sent.

Search Document