Skip to content

Commit

Permalink
add additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjackson committed Aug 8, 2024
1 parent e4249c0 commit 0e71530
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/meta/cp4m/message/WAMessageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ public List<RouteDetails<?, WAMessage>> routeDetails() {
payload = MAPPER.readValue(bodyString, WebhookPayload.class);
return Optional.of(payload);
} catch (Exception e) {
LOGGER.atWarn().setCause(e).log("unable to parse payload");
return Optional.empty();
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/test/java/com/meta/cp4m/message/WAMessageHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,34 @@ class WAMessageHandlerTest {
"object": "whatsapp_business_account",
"entry": [
{
"id": "362118040319556",
"id": "373128041419556",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "13137829971",
"phone_number_id": "390095987512130"
"display_phone_number": "16505551111",
"phone_number_id": "123456123"
},
"contacts": [
{
"profile": {
"name": "Benjamin Broadstone"
"name": "Bob Bobson"
},
"wa_id": "12027330824"
"wa_id": "12247330922"
}
],
"messages": [
{
"context": {
"from": "13137829971",
"id": "wamid.HBgLMTIwMjczMzA4MjQVAgARGBJCRjg3QkEwRjZGRTY5MERBMTUA"
"id": "wamid.HBgLMrIwqjczMzA4MjQVAgarGBjcRjg3QkEwRjZGRTY5MERBMTUA"
},
"from": "12027330824",
"id": "wamid.HBgLMTIwMjczMzA4MjQVAgASGBQzQUFFNTkxMDIzQjk5RjNFQjQ5MgA=",
"id": "wamid.HBgLMTIwMjczMzA4MjQVAgASGBQzQUFENTkyMDIdQjk6RjNFQjQ5MbA=",
"timestamp": "1723063165",
"text": {
"body": "Cool"
"body": "Coolio"
},
"type": "text"
}
Expand Down

0 comments on commit 0e71530

Please sign in to comment.