Skip to content
Welcome to the Gluegun documentation!

gluegun/error

Error types returned by Gluegun effectful APIs.

Match variants such as Timeout, ConnectionDown, and InvalidMessage for application-specific recovery, and keep a fallback for Erlang or decode errors.

Errors returned by Gluegun connection, request, message, and WebSocket APIs.

  • Timeout()
  • ConnectionDown(String)
  • ConnectionError(String)
  • StreamError(String)
  • InvalidOptions(String)
  • InvalidMessage(String)
  • ErlangError(String)
  • DecodeError(String)

Decode an FFI error reason into a Gluegun error.

pub fn decode_ffi_error(gleam/dynamic.Dynamic) -> gluegun/error.GluegunError