Skip to content

[9.x] Send along value to InvalidPayloadException#47223

Merged
taylorotwell merged 2 commits into
9.xfrom
payload-on-exception
May 30, 2023
Merged

[9.x] Send along value to InvalidPayloadException#47223
taylorotwell merged 2 commits into
9.xfrom
payload-on-exception

Conversation

@driesvints

@driesvints driesvints commented May 25, 2023

Copy link
Copy Markdown
Member

This PR will send along the value that's being attempted to encode with the InvalidPayloadException that's thrown if there's an error. This hopefully gives more insight when debugging why the payload is invalid.

@driesvints driesvints changed the title Send along value to InvalidPayloadException [9.x] Send along value to InvalidPayloadException May 25, 2023
@driesvints
driesvints marked this pull request as ready for review May 26, 2023 06:38
@driesvints
driesvints marked this pull request as draft May 26, 2023 06:38

@jbrooksuk jbrooksuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My only concern is that the value could be quite large. I wonder if we should truncate in some way?

@driesvints

Copy link
Copy Markdown
Member Author

@jbrooksuk this is only useful if we can inspect the full value. Otherwise this has no meaning. We'd want to retry encoding and inspect the value to see why it fails.

This value is only kept in memory afaik.

@driesvints
driesvints marked this pull request as ready for review May 29, 2023 12:06
@taylorotwell
taylorotwell merged commit 07faff7 into 9.x May 30, 2023
@taylorotwell
taylorotwell deleted the payload-on-exception branch May 30, 2023 14:32
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.

3 participants