From 9ed8905a5c44ffe629df4dc1f5dfe0df5b25efbb Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 29 Sep 2024 18:37:23 -0400 Subject: [PATCH] Always return status code ok. --- src/webhook.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webhook.rs b/src/webhook.rs index e7772e0..97c2059 100644 --- a/src/webhook.rs +++ b/src/webhook.rs @@ -58,7 +58,8 @@ pub(crate) async fn hook( }), ), Err(_) => ( - StatusCode::INTERNAL_SERVER_ERROR, + // StatusCode::INTERNAL_SERVER_ERROR, + StatusCode::OK, Json(HookResponse { ok: false, message: Some("Failed to handle push event.".to_string()), @@ -67,7 +68,8 @@ pub(crate) async fn hook( } } HookRequest::Unrecognized(payload) => ( - StatusCode::BAD_REQUEST, + // StatusCode::BAD_REQUEST, + StatusCode::OK, Json(HookResponse { ok: false, message: Some(format!("unrecognized event type: {payload}")),