Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle messages without data #99

Merged
merged 3 commits into from May 6, 2024
Merged

Handle messages without data #99

merged 3 commits into from May 6, 2024

Conversation

mcrumm
Copy link
Collaborator

@mcrumm mcrumm commented May 2, 2024

Messages with payloadFormat: "NONE" may not contain the data attribute. Note something may have changed on Google's side because I believe this was previously handled by the nil check.

Closes #98

Messages with payloadFormat: "NONE" may not contain the data attribute.
Note something may have changed on Google's side because I belive this
was previously handled by the nil check.

Closes #98
@mcrumm
Copy link
Collaborator Author

mcrumm commented May 2, 2024

@wojtekmach We could get more specific and pattern match on the message attributes but I am not sure there is much virtue in it. What do you think?

@josevalim
Copy link
Member

We could get more specific and pattern match on the message attributes

The benefit of doing that is that, if there is a new format in the future, we won't try to accidentally decode without knowing what it actually is.

mcrumm added 2 commits May 2, 2024 15:57
The nil data case was originally fixed in #14 so I am leaving the
explicit match for messages with nil data. The attribute match will
cover the cases where no data attribute exists on the payload.
@mcrumm mcrumm merged commit d7392c8 into main May 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with v.0.9.0: no function clause matching in BroadwayCloudPubSub.PullClient.decode_message/1
2 participants