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

Dont ignore json marshal errors #2435

Merged
merged 1 commit into from
Apr 24, 2020
Merged

Dont ignore json marshal errors #2435

merged 1 commit into from
Apr 24, 2020

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented Apr 22, 2020

Summary

There are places in our codebase where we are ignoring errors from json.Marshal. The vast majority of these cases are basically impossible to return an error, but it's not a good pattern to have in our code and it appears to have been copy and pasted into a few places where we could potentially have errors.

This could also protect us from future code changes that might break json.Marshal.

Implementation details

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sparrc sparrc changed the title Dont ignore json marshal errors, no matter how unlikely Dont ignore json marshal errors Apr 22, 2020
@sparrc sparrc added this to the 1.40.0 milestone Apr 24, 2020
@sparrc sparrc merged commit 55a4769 into aws:dev Apr 24, 2020
@sparrc sparrc deleted the json-marshal-errors branch April 24, 2020 17:22
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.

4 participants