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

Function kube_api_error

crates/openshell-server/src/auth/k8s_sa.rs:561–572  ·  view source on GitHub ↗
(code: u16, message: &str)

Source from the content-addressed store, hash-verified

559 }
560
561 fn kube_api_error(code: u16, message: &str) -> KubeError {
562 KubeError::Api(kube::core::ErrorResponse {
563 status: if code == 404 {
564 "404 Not Found".to_string()
565 } else {
566 "Failure".to_string()
567 },
568 message: message.to_string(),
569 reason: "Failed to parse error data".to_string(),
570 code,
571 })
572 }
573
574 #[test]
575 fn sandbox_api_version_probe_retries_on_structured_and_raw_404() {

Calls

no outgoing calls