Ignore "Future Errors"
Changed
- When an error is thrown and we're ahead of the current function in the stack, re-throw it
- This can occur when an error is thrown from
done()and our synchronoustry..catchsees it - It could also be reproduced internally by getting into an inconsistent state - theoretically if a function did
next(); throw new Error()it'd diverge and handle future functions, thencatchand handle the error functions in the same stack (breaking user expectations)
- This can occur when an error is thrown from
- Added
debugforstderrlogging - Add generics to
typesignatures forreq, res, next