Expand description
HTTP error code mapping to Kubernetes status condition reasons.
This module provides utilities for mapping HTTP status codes from the Bindcar API to standardized Kubernetes condition reasons. This enables consistent error handling and troubleshooting across the operator.
§Usage
use bindy::http_errors::map_http_error_to_reason;
// Map HTTP status codes to Kubernetes condition reasons
let (reason, message) = map_http_error_to_reason(404);
assert_eq!(reason, "ZoneNotFound");
let (reason, message) = map_http_error_to_reason(500);
assert_eq!(reason, "BindcarInternalError");Functions§
- map_
http_ error_ to_ reason - Map HTTP status code to condition reason and message.