Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Fixed issue where error was thrown when message body is not JSON #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

johndierks
Copy link

In cases where the message's body is not JSON, trying to parse the body as JSON throws an error and crashes the process.

To prevent this from happening, we can attempt to parse the message body in a try block. If the message is not valid JSON, the catch block catches the error and then assigns the raw message string as the data.

@chriskinsman
Copy link

Any possibility we could get this merged?

Thanks!

@chriskinsman
Copy link

@bigluck Checking back in to see if we could get this merged and published. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants