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

Make access do deserialized payload effectful #21

Merged
merged 2 commits into from
May 23, 2024
Merged

Conversation

satabin
Copy link
Collaborator

@satabin satabin commented May 23, 2024

Deserializing the content might fail if the payload is malformed. The idea is to make access to it effectful (with memoization) so that failure occurs when the payload is accessed. The logic behind it is that this is a business logic error to handle, not something that can be handled at the library level.

This PR also introduces access to the rawPayload to handle malformed body.

Deserializing the content might fail if the payload is malformed. The
idea is to make access to it effectful (with memoization) so that
failure occurs when the payload is accessed. The logic behind it is that
this is a business logic error to handle, not something that can be
handled at the library level.

This PR also introduces access to the `rawPayload` to handle malformed
body.
@satabin satabin added the enhancement New feature or request label May 23, 2024
@satabin satabin added this to the 0.2.0 milestone May 23, 2024
@satabin satabin requested a review from AL333Z May 23, 2024 07:02
Since we are in `0.x` series, allow for some breakage
Copy link
Member

@AL333Z AL333Z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@satabin satabin merged commit 40a1abf into main May 23, 2024
10 checks passed
@satabin satabin deleted the message-deserialization branch May 23, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants