MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / kube_api_error

Function kube_api_error

crates/openshell-driver-kubernetes/src/driver.rs:2237–2248  ·  view source on GitHub ↗
(code: u16, message: &str)

Source from the content-addressed store, hash-verified

2235 }
2236
2237 fn kube_api_error(code: u16, message: &str) -> KubeError {
2238 KubeError::Api(kube::core::ErrorResponse {
2239 status: if code == 404 {
2240 "404 Not Found".to_string()
2241 } else {
2242 "Failure".to_string()
2243 },
2244 message: message.to_string(),
2245 reason: "Failed to parse error data".to_string(),
2246 code,
2247 })
2248 }
2249
2250 #[test]
2251 fn sandbox_api_version_probe_retries_on_structured_and_raw_404() {

Calls

no outgoing calls