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 Message Writable After It Is Initially Set #9

Merged
merged 1 commit into from
Mar 8, 2016

Conversation

jwdotjs
Copy link
Contributor

@jwdotjs jwdotjs commented Mar 8, 2016

In Hapi, if an ES6Error is thrown outside of the request/reply lifecycle, Boom will attempt to catch the uncaught error and return a badImplementation. During this process they rewrite the message property to have "Uncaught Error:" in front of it (https://github.com/hapijs/boom/blob/master/lib/index.js#L124)

ES6Error's message isn't writable after initially being said so this causes Boom to throw a TypeError, which will crash the application.

Making the message writable solves this fatal crash (tested on my local branch)

@bjyoungblood
Copy link
Owner

👍

bjyoungblood added a commit that referenced this pull request Mar 8, 2016
Make Message Writable After It Is Initially Set
@bjyoungblood bjyoungblood merged commit 04ad894 into bjyoungblood:master Mar 8, 2016
@bjyoungblood
Copy link
Owner

Published v2.1.0.

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.

2 participants