{"record":{"id":"ac74d2798bf09c4b","repo":"tinyhumansai/openhuman","slug":"backend-returned-status-text-for-method-upper","errorCode":null,"errorMessage":"Backend returned {status_text} for {method_upper} {url}: {detail}","messagePattern":"Backend returned (.+?) for (.+?) (.+?): (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/client.rs","lineNumber":468,"sourceCode":"                        &detail\n                    ));\n                }\n                let status_text = reqwest::StatusCode::from_u16(status)\n                    .map(|status| status.to_string())\n                    .unwrap_or_else(|_| status.to_string());\n                let status_code = status.to_string();\n                crate::core::observability::report_error_or_expected(\n                    format!(\"Backend returned {status_text} for {method_upper} {url}: {detail}\")\n                        .as_str(),\n                    \"integrations\",\n                    method,\n                    &[\n                        (\"path\", path),\n                        (\"status\", status_code.as_str()),\n                        (\"failure\", \"non_2xx\"),\n                    ],\n                );\n                anyhow::anyhow!(\"Backend returned {status_text} for {method_upper} {url}: {detail}\")\n            }\n            other => anyhow::anyhow!(\"{method_upper} {url} failed: {other}\"),\n        }\n    }\n\n    fn parse_envelope<T: serde::de::DeserializeOwned>(\n        method: &str,\n        path: &str,\n        url: &str,\n        value: serde_json::Value,\n    ) -> anyhow::Result<T> {\n        let method_upper = method.to_uppercase();\n        let envelope: BackendResponse<T> = serde_json::from_value(value)?;\n        if !envelope.success {\n            let msg = envelope\n                .error\n                .unwrap_or_else(|| \"unknown backend error\".into());\n            crate::core::observability::report_error_or_expected(","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/client.rs#L450-L486","documentation":"map_sdk_error's generic status arm: the backend answered with a non-success HTTP status that is not a transport error or a 401. The status text, method, URL and body detail are formatted into the error and reported to observability for triage.","triggerScenarios":"Thrown at src/openhuman/integrations/client.rs:468 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the status code and body detail for the specific backend refusal (validation, quota, server error)","Retry on 5xx — server-side failures are often transient","Verify request parameters if the status is 4xx"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}