-
Notifications
You must be signed in to change notification settings - Fork 131
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
set onError function will get error:'next() called multiple times' #112
Comments
I have the same problem. If I add |
koa-bodyparser solved my problem |
The same problem |
Solved. If you have an error handler, there will throw this error. Use you error handler for error handling instead. |
It appears that where onError may be called, koa-body does not bail out after calling the onerror function and instead continues execution. Of note: This is likely a BC-breaker, but we should consider returning after calling the onError function (and NOT calling |
Promblem/Feature Request Summary
set onError function will get error:'next() called multiple times'
Environment Information
Current Behavior
get follow error
Steps to Reproduce
1.i am testing the maxFieldsSize,i upload a file which file size lager than 1kb.
2.when no onError function,koa app just thorw a excceed size error message.
3.when i set the onError function to catch error,i get the error above.
Expected Behavior
Respone excceed size error message to client,and koa app get no error
Possible Solution
Maybe koa-router conflict with koa-body? i can't find the solution.
Context (Environment)
The text was updated successfully, but these errors were encountered: