Promise error sometimes on load - sapphire.js framework

Hey, Whenever I am starting my bot within a docker environment, I am getting this error sometimes;
2024-04-22 12:04:51 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 0 commands

2024-04-22 12:04:52 - INFO - ApplicationCommandRegistries(BulkOverwrite) Successfully overwrote global application commands. The application now has 0 global commands

2024-04-22 12:04:52 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting guild application commands for guild xxxxx, now at 14 commands

node:internal/process/promises:289

triggerUncaughtException(err, true /* fromPromise */);

^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {

code: 'ERR_UNHANDLED_REJECTION'

}
2024-04-22 12:04:51 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 0 commands

2024-04-22 12:04:52 - INFO - ApplicationCommandRegistries(BulkOverwrite) Successfully overwrote global application commands. The application now has 0 global commands

2024-04-22 12:04:52 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting guild application commands for guild xxxxx, now at 14 commands

node:internal/process/promises:289

triggerUncaughtException(err, true /* fromPromise */);

^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {

code: 'ERR_UNHANDLED_REJECTION'

}
However it only occurs every now and again which exits then if I restart it works fine; any ideas?
2 Replies
Favna
Favna9mo ago
hard to say, the error doesnt have any stacktace or such and fromPromise doesnt' say much because it's code we use a lot
mk3ext
mk3extOP9mo ago
Any ideas on how to better debug it? :thonk:
Want results from more Discord servers?
Add your server