]> git.puffer.fish Git - matthieu/nova.git/commitdiff
add error log on invalid json
authorMatthieu <matthieu@developershouse.xyz>
Wed, 20 Oct 2021 10:40:26 +0000 (14:40 +0400)
committerMatthieu <matthieu@developershouse.xyz>
Wed, 20 Oct 2021 10:40:26 +0000 (14:40 +0400)
webhook/src/handler/handler.rs

index a07f99555cfbfa6041f3184875dad9ad0c2b4bc8..e54b5ee926597ce81789384f918e967f5f02d644 100644 (file)
@@ -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")),