Additional logging for mailchimp hooks
@@ -1542,10 +1542,13 @@ pub async fn handle_mailchimp_mailing_list(rqctx: Arc<RequestContext<Context>>,
// We should have a string, which we will then parse into our args.
let event_string = body_param.as_str().unwrap().to_string();
+
+ info!("Handling MailChimp mailing_list webhook {}", event_string);
+
let qs_non_strict = QSConfig::new(10, false);
let event: MailChimpWebhook = qs_non_strict.deserialize_str(&event_string).map(|err| {
- warn!("Failed to parse MailChimp webhook. err: {:?}", err);
+ warn!("Failed to parse MailChimp mailing list webhook. err: {:?}", err);
err
})?;
@@ -1582,9 +1585,15 @@ pub async fn handle_mailchimp_rack_line(rqctx: Arc<RequestContext<Context>>, bod
// We should have a string, which we will then parse into our args.
let event_string = body_param.as_str().unwrap().to_string();
+
+ info!("Handling MailChimp rack_line webhook {}", event_string);
+
let qs_non_strict = QSConfig::new(10, false);
- let event: MailChimpWebhook = qs_non_strict.deserialize_str(&event_string)?;
+ let event: MailChimpWebhook = qs_non_strict.deserialize_str(&event_string).map(|err| {
+ warn!("Failed to parse MailChimp rack_line webhook. err: {:?}", err);
+ err
+ })?;
if event.webhook_type != *"subscribe" {
info!("not a `subscribe` event, got `{}`", event.webhook_type);
