Mangrullo::ErrorHandling
Error handling utilities
Class methods
Wrap Docker API operations with consistent error handling
Generic Docker API operation wrapper for operations that return specific types
docker_api_operation_with_nil(operation : String, context : String | Nil = nil, &) : Result(Nil, String)
Wrap operations that might return nil, but still want error handling
http_operation(operation : String, context : String | Nil = nil, &) : Result(HTTP::Client::Response, String)
Wrap HTTP operations with consistent error handling
log_and_return_error(operation : String, error : Exception, log_level : Log::Severity = Log::Severity::Error, context : String | Nil = nil) : Result(Nil, String)
Log an error with consistent format and return error result
log_debug_and_return_error(operation : String, error : Exception, context : String | Nil = nil) : Result(Nil, String)
Log a debug message and return error result (for non-critical failures)
Sanitize error messages to prevent malformed output