View Source SwarmEx.Error (SwarmEx v0.1.0)
Defines custom error types and error handling utilities for SwarmEx.
This module provides a set of error exceptions specific to different failure modes in the SwarmEx system, along with helper functions for error handling and formatting.
Summary
Types
@type error_context() :: %{ timestamp: DateTime.t(), network_id: String.t() | nil, correlation_id: String.t() | nil, metadata: map() }
@type error_severity() :: :warning | :error | :critical
@type error_type() ::
:agent | :tool | :network | :handoff | :initialization | :unknown
Functions
@spec create_error_context(keyword()) :: error_context()
Creates a standardized error context map.
@spec generate_correlation_id() :: String.t()
Generates a correlation ID for error tracking.