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

Return error during plugin registration for invalid options. #49

Merged
merged 1 commit into from Feb 26, 2015

Conversation

@briandela
Copy link
Contributor

briandela commented Feb 26, 2015

Crumb was throwing an exception for invalid options rather than returning an error to the registration function callback (http://hapijs.com/api#serverregisterplugins-options-callback).

This PR changes the behaviour to return an error to the registration function callback. I'm not sure what the preferred behaviour is - I noticed that the lout plugin returns an error (rather than throwing - https://github.com/hapijs/lout/blob/master/lib/index.js#L43) - this change mimics that behaviour.

@stongo stongo added this to the 4.0.3 milestone Feb 26, 2015
@stongo stongo added the feature label Feb 26, 2015
stongo added a commit that referenced this pull request Feb 26, 2015
Return error during plugin registration for invalid options.
@stongo stongo merged commit e372b1f into hapijs:master Feb 26, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.