Search documentation of bb

# BB.Error.Severity protocol (bb v0.17.0)

Copy Markdown View Source

Protocol for determining error severity.

All error types in the BB ecosystem must implement this protocol. Implementation is enforced at compile time via the `use BB.Error` macro.

## Severity Levels

- `:critical` - Immediate safety response required. For `:safety` class errors, this triggers automatic disarm.
- `:error` - Operation failed. May retry or degrade gracefully.
- `:warning` - Unusual condition, operation continues.

## Summary

### Types

t()

### Functions

severity(error)

Returns the severity level for this error.

## Types

# t()

    @type t() :: :critical | :error | :warning

## Functions

# severity(error)

    @spec severity(t()) :: t()

Returns the severity level for this error.