Skip to content

Commit

Permalink
Merge pull request #66 from facebookincubator/hunter/jackson_throwable
Browse files Browse the repository at this point in the history
Handle Jackson throwing a Throwable, not an Exception
  • Loading branch information
sachinkarve authored Aug 14, 2024
2 parents d44c761 + ef35972 commit 0a9e761
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/meta/cp4m/message/WAMessageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public List<RouteDetails<?, WAMessage>> routeDetails() {
try {
payload = MAPPER.readValue(bodyString, WebhookPayload.class);
return Optional.of(payload);
} catch (Exception e) {
} catch (Throwable e) {
LOGGER.atWarn().setCause(e).log("unable to parse payload");
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public int hashCode() {
public enum StatusType {
DELIVERED,
READ,
SENT;
SENT,
FAILED;

public String toString() {
return this.name().toLowerCase();
Expand Down

0 comments on commit 0a9e761

Please sign in to comment.