summaryrefslogtreecommitdiff
path: root/webhook/src/handler/handler.rs
diff options
context:
space:
mode:
authorMatthieu <matthieu@developershouse.xyz>2021-10-20 14:40:26 +0400
committerMatthieu <matthieu@developershouse.xyz>2021-10-20 14:40:26 +0400
commitb73f3c90ec2a491d59275818e3f61826471452ba (patch)
tree6591979b00d458e86d52c9c50d69e62784fef083 /webhook/src/handler/handler.rs
parent267729329a69cd579ac1a3333080a784f1ac2b94 (diff)
add error log on invalid json
Diffstat (limited to 'webhook/src/handler/handler.rs')
-rw-r--r--webhook/src/handler/handler.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/webhook/src/handler/handler.rs b/webhook/src/handler/handler.rs
index a07f995..e54b5ee 100644
--- a/webhook/src/handler/handler.rs
+++ b/webhook/src/handler/handler.rs
@@ -124,10 +124,13 @@ impl HandlerService {
}
},
- Err(_) => Err(WebhookError::new(
+ Err(error) => {
+ error!("invalid json body: {}", error);
+ Err(WebhookError::new(
StatusCode::BAD_REQUEST,
"invalid json body",
- )),
+ ))
+ },
},
Err(_) => Err(WebhookError::new(StatusCode::BAD_REQUEST, "not utf-8 body")),