Understanding Error
The following error is showing up in my logs occasionally. I have a basic understanding of the causes of an unknown interaction, and I believe I can TS the issue, but I have no idea what interaction or code is causing it.
I am unsure if I am not getting any additional traces due to how I log unhandled rejections or if there is no more info. But when I google the error, the posts usually contain more stack traces pointing to the offending file. Do you have any tips on making errors like this a bit more usable to help track down the offending code?
I am unsure if I am not getting any additional traces due to how I log unhandled rejections or if there is no more info. But when I google the error, the posts usually contain more stack traces pointing to the offending file. Do you have any tips on making errors like this a bit more usable to help track down the offending code?
3 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPHow do you log the error? You should definitely be able to get more information
I am using pino and this ....
I just noticed that the one in my orginial post is missing access error, which is really self explanitory, but again no trace. Here is an unkown interaction.
The only thing I can figgure out is that somewhere in the logging setup, whether it is the unhandled handler or perhaps becuase I am doing that process.on inside a plugin package, or whatever.
Just to confirm...there should be more to this error stack correct? As long as I know that, then I know that I need to go dig into my logging setup.
So thank you for getting me going in the direction i needed with one question 😄
If I change to this
I get the extra stack trace. So this now gets into the realm of still learning, and if I need to go ask in another server I will, but if I want to wrap the error so that it logs as "Unhandled rejection", what do I need to do to ensure all the trace stays?
For reference so you do not have to go back through everything, here is my current code, that does not work.