Always return status code ok.
This commit is contained in:
parent
8cb28459a0
commit
9ed8905a5c
@ -58,7 +58,8 @@ pub(crate) async fn hook(
|
|||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
Err(_) => (
|
Err(_) => (
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
// StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
|
StatusCode::OK,
|
||||||
Json(HookResponse {
|
Json(HookResponse {
|
||||||
ok: false,
|
ok: false,
|
||||||
message: Some("Failed to handle push event.".to_string()),
|
message: Some("Failed to handle push event.".to_string()),
|
||||||
@ -67,7 +68,8 @@ pub(crate) async fn hook(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
HookRequest::Unrecognized(payload) => (
|
HookRequest::Unrecognized(payload) => (
|
||||||
StatusCode::BAD_REQUEST,
|
// StatusCode::BAD_REQUEST,
|
||||||
|
StatusCode::OK,
|
||||||
Json(HookResponse {
|
Json(HookResponse {
|
||||||
ok: false,
|
ok: false,
|
||||||
message: Some(format!("unrecognized event type: {payload}")),
|
message: Some(format!("unrecognized event type: {payload}")),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user