-
Notifications
You must be signed in to change notification settings - Fork 283
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
fix: query and error logging both occur on error. #796
fix: query and error logging both occur on error. #796
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Awesome tests as usual. In fact maybe too awesome 😄 We should try to write the minimum amount of tests that still do the job "well enough". We also need to maintain the tests, and having a gazillion tests just slows down development.
7795366
to
7bdd416
Compare
* deny logging query and error onerror. also deny catching custom log err. * move caughtError declaration so it doesn't take up "execution time". * fix defaultLogger error handling when not Error. * test logging.
closes #743.
This is better than the suggested solution in the comment section. If we moved query logging to the
try
body, we'd catch errors in user's logging logic. User has all the context necessary to handle his logic's exceptions and print necessary errors.Regarding timing mismatch, not much we can do about it.
Went ahead and fixed
defaultLogger
's error handling when notError
- it was printing[object Object]
.