WebsockexAdapter.ErrorHandler (WebsockexAdapter v0.1.1)
View SourceSimple error handling for WebSocket connections.
Handles common error scenarios:
- Connection errors (network failures)
- Protocol errors (malformed frames)
- Authentication errors
- Timeout errors
Passes raw errors without wrapping to preserve original error information.
Summary
Functions
Categorizes errors into recoverable vs non-recoverable types.
Handles errors by returning appropriate actions.
Determines if an error is recoverable through reconnection.
Functions
Categorizes errors into recoverable vs non-recoverable types.
Returns the raw error unchanged to preserve all original information.
@spec handle_error(term()) :: :reconnect | :stop
Handles errors by returning appropriate actions.
Returns either :reconnect or :stop based on error recoverability.
Determines if an error is recoverable through reconnection.