diff --git a/server/Server.js b/server/Server.js index 8bbfa4d3..17466e86 100644 --- a/server/Server.js +++ b/server/Server.js @@ -182,7 +182,7 @@ class Server { * @see https://nodejs.org/api/process.html#event-unhandledrejection */ process.on('unhandledRejection', async (reason, promise) => { - await Logger.fatal(`[Server] Unhandled rejection: ${reason}, promise:`, util.format('%O', promise)) + await Logger.fatal('[Server] Unhandled rejection:', reason, '\npromise:', util.format('%O', promise)) process.exit(1) }) } diff --git a/server/models/PlaybackSession.js b/server/models/PlaybackSession.js index 5442387f..c7c6323a 100644 --- a/server/models/PlaybackSession.js +++ b/server/models/PlaybackSession.js @@ -117,7 +117,7 @@ class PlaybackSession extends Model { static createFromOld(oldPlaybackSession) { const playbackSession = this.getFromOld(oldPlaybackSession) - return this.create(playbackSession, { + return this.upsert(playbackSession, { silent: true }) }