{"record":{"id":"75380d973d840cc9","repo":"Hmbown/CodeWhale","slug":"webhook-returned-non-success-status","errorCode":null,"errorMessage":"webhook returned non-success status {}","messagePattern":"webhook returned non-success status (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/hooks/src/lib.rs","lineNumber":239,"sourceCode":"#[async_trait]\nimpl HookSink for WebhookHookSink {\n    async fn emit(&self, event: &HookEvent) -> Result<()> {\n        let mut retries = 0usize;\n        loop {\n            let resp = self\n                .client\n                .post(&self.url)\n                .json(&json!({\n                    \"at\": Utc::now().to_rfc3339(),\n                    \"event\": event,\n                }))\n                .send()\n                .await;\n            match resp {\n                Ok(response) if response.status().is_success() => return Ok(()),\n                Ok(response) => {\n                    if retries >= 2 {\n                        anyhow::bail!(\"webhook returned non-success status {}\", response.status());\n                    }\n                }\n                Err(err) => {\n                    if retries >= 2 {\n                        return Err(err).context(\"webhook request failed\");\n                    }\n                }\n            }\n            retries += 1;\n            tokio::time::sleep(std::time::Duration::from_millis(200 * retries as u64)).await;\n        }\n    }\n}\n\n/// A [`HookSink`] that sends events over a Unix domain socket.\n///\n/// Each event is serialized as a single JSON line (`{\"at\": \"...\", \"event\": {...}}\\n`)\n/// and written to the socket. If the socket is not available (listener not running),","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/hooks/src/lib.rs#L221-L257","documentation":"Error \"webhook returned non-success status {}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/hooks/src/lib.rs:239 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}