pub fn map_connection_error() -> (&'static str, String)Expand description
Map connection error to condition reason and message.
Use this when the HTTP client cannot establish a connection to Bindcar, before receiving any HTTP status code.
§Returns
A tuple of (reason, message):
reason-REASON_BINDCAR_UNREACHABLEmessage- Human-readable explanation
§Common Causes
- Bindcar container not running
- Network policy blocking traffic
- Bindcar listening on wrong port
- DNS resolution failure
§Example
use bindy::http_errors::map_connection_error;
match client.get("http://localhost:8080/zones").send().await {
Ok(response) => { /* handle response */ }
Err(e) => {
let (reason, message) = map_connection_error();
// Set condition: Pod-0 status=False reason=BindcarUnreachable
}
}