mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-20 04:38:55 +00:00
fix(logger): only two arguments to logger when logging an unhandled promise rejection
This commit is contained in:
parent
4300c7b1bf
commit
2fc4d0f00c
1 changed files with 2 additions and 2 deletions
|
|
@ -207,8 +207,8 @@ const loggerInterface = {
|
|||
// Logs unhandled promises errors
|
||||
// when no catch is attached to a promise a unhandledRejection event will be triggered
|
||||
// reason is the error, p the promise where it originated
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
loggerInterface.error(reason, 'unhandledPromiseRejection at', p);
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
loggerInterface.error(reason, { message: 'unhandledPromiseRejection', promise });
|
||||
});
|
||||
|
||||
export default loggerInterface;
|
||||
|
|
|
|||
Loading…
Reference in a new issue