diff options
| author | Matthieu <matthieu@developershouse.xyz> | 2021-10-20 14:40:26 +0400 |
|---|---|---|
| committer | Matthieu <matthieu@developershouse.xyz> | 2021-10-20 14:40:26 +0400 |
| commit | b73f3c90ec2a491d59275818e3f61826471452ba (patch) | |
| tree | 6591979b00d458e86d52c9c50d69e62784fef083 /webhook/src/handler/handler.rs | |
| parent | 267729329a69cd579ac1a3333080a784f1ac2b94 (diff) | |
add error log on invalid json
Diffstat (limited to 'webhook/src/handler/handler.rs')
| -rw-r--r-- | webhook/src/handler/handler.rs | 7 |
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")), |
