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
Merged

Return error during plugin registration for invalid options. #49

merged 1 commit into from
Feb 26, 2015

Conversation

briandela
Copy link
Contributor

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 New functionality or improvement 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
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants