8000 Turn argument validation into the first hook by daffl · Pull Request #818 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

Turn argument validation into the first hook#818

Merged
daffl merged 1 commit intomasterfrom
validate-args-hook
Feb 8, 2018
Merged

Turn argument validation into the first hook#818
daffl merged 1 commit intomasterfrom
validate-args-hook

Conversation

@daffl
Copy link
Member
@daffl daffl commented Feb 8, 2018

Feathers argument validation ran outside the normal hook chain which causes a bug when the hook object is expected to be returned, e.g. in the REST and websocket API transports and it skipped error hooks. The solution was to make it the very first hook in the chain so it will be treated like any other error.

Closes feathersjs-ecosystem/express#19

@daffl daffl changed the title Turn argument validation into the first hook to make consistent respo… Turn argument validation into the first hook Feb 8, 2018
@daffl daffl merged commit a3df665 into master Feb 8, 2018
@daffl daffl deleted the validate-args-hook branch February 8, 2018 23:43
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.

1 participant

0