Closed yulianovdey closed 9 months ago
Hey @yulianovdey! Thanks for opening this issue. We can remedy this by removing that console.error
line and instead we can just intercept the error and throw an SDK specific error with the original message embedded with it. We'll fix this and include it in a future update. Thanks for opening this issue!
approach to fix:
Thanks for your patience @yulianovdey, we now remove the console calls and allow you to pass in a logger if you want to receive messages.
Describe the bug There is a
console.error
call here we can't route through our logging handler. This is particularly an issue with Datadog becauseerr.stack
ends up including new lines and every line ends up as a separate log statement.To Reproduce We see this happen whenever a server error is returned from Nylas.
Expected behavior nylas-nodejs does not log anything directly, and instead offers an option to toggle this behavior, or provides a way to inject a logger.
SDK Version: Latest.
Additional context It looks like calls to
console.log
were removed in 3.1.1, but this error log was kept in.Thank you!