Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Conversation

maurodoglio
Copy link
Contributor

@maurodoglio maurodoglio commented Mar 15, 2017

@maurodoglio maurodoglio requested a review from whd March 15, 2017 15:36
@maurodoglio maurodoglio self-assigned this Mar 15, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 68.766% when pulling 0234df5 on bug-1347283-catch-deserialization-exceptions into c31680d on master.

if field.name == 'submission':
payload = _parse_json(field.value_bytes[0].decode('utf-8'))
try:
payload = _parse_json(field.value_bytes[0].decode('utf-8'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also wrap the above call where we parse message.payload?

Copy link
Member

Choose a reason for hiding this comment

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

We probably don't need to do this, since message.payload is only ever populated by something that is guaranteed to be (escaped) UTF8.

Copy link
Member

Choose a reason for hiding this comment

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

It appears simply calling .decode('utf-8', 'ignore') may be the better solution. The test case to reproduce in the bug works and this would map more closely to what we're doing in scala.

@whd
Copy link
Member

whd commented Mar 16, 2017

Closing in favor of #117.

@whd whd closed this Mar 16, 2017
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.

4 participants