fix(webhooks): handling errors inside source verification (#1994)

This commit is contained in:
Nishant Joshi
2023-08-23 16:33:00 +05:30
committed by GitHub
parent 36631ad97b
commit f690c5f3ea

View File

@ -803,6 +803,13 @@ pub async fn webhooks_core<W: types::OutgoingWebhookType>(
object_ref_id.clone(),
)
.await
.or_else(|error| match error.current_context() {
errors::ConnectorError::WebhookSourceVerificationFailed => {
logger::error!(?error, "Source Verification Failed");
Ok(false)
}
_ => Err(error),
})
.switch()
.attach_printable("There was an issue in incoming webhook source verification")?;