Skip to content

Commit

Permalink
Handle Jackson throwing a Throwable, not an Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjackson committed Aug 14, 2024
1 parent d44c761 commit ef35972
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 ef35972

Please sign in to comment.