hoangvvo / next-connect

The TypeScript-ready, minimal router and middleware layer for Next.js, Micro, Vercel, or Node.js http/http2
https://www.npmjs.com/package/next-connect
MIT License
1.62k stars 65 forks source link

default value of options.onError #212

Open thilllon opened 1 year ago

thilllon commented 1 year ago

It is not an issue, but kind of a question. The official docs highly recommends setting onError options, but users who don't read it carefully seem to miss it easily. Is there any reason that this option is not set as default?

image
jameshfisher commented 1 year ago

This seems to be a problem with the v1 branch - setting a default onError is no longer really possible, because it has to be set in the final .handler(...) call.