mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
fix(logger): improve logging and make sure no data is lost
This commit is contained in:
@@ -71,9 +71,9 @@ function sendNotification (user, details = {}) {
|
||||
.then(response => {
|
||||
response.failed.forEach(failure => {
|
||||
if (failure.error) {
|
||||
logger.error('APN error', failure.error);
|
||||
logger.error(new Error('APN error'), { failure });
|
||||
} else {
|
||||
logger.error('APN transmissionError', failure.status, notification, failure.device);
|
||||
logger.error(new Error('APN transmissionError'), { failure, notification });
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user