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

Catch and report possible `JSON.stringify` errors in `Iron.seal` #45

merged 1 commit into from Aug 26, 2016


Copy link

stevebest commented Jun 10, 2016

JSON.stringify can throw a TypeError when it encounters a cyclic structure. I made Iron.seal catch these errors, so instead of blowing up synchronously it reports them to a provided callback.

This change mirrors Iron.unseal behavior, which reports JSON.parse errors.


This comment has been minimized.

Copy link

d2lam commented Jul 28, 2016


@hueniverse hueniverse added the bug label Aug 26, 2016
@hueniverse hueniverse added this to the 4.0.2 milestone Aug 26, 2016
@hueniverse hueniverse self-assigned this Aug 26, 2016
@hueniverse hueniverse merged commit 4a0c1b7 into hapijs:master Aug 26, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@hueniverse hueniverse modified the milestones: 4.0.2, 4.0.3 Aug 26, 2016
hueniverse added a commit that referenced this pull request Aug 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.