From ad0997adfb9e1e3b1ff54338d7558cf7b18440ea Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 7 Jul 2017 18:26:12 +0200 Subject: Fix error logging --- server/helpers/database-utils.ts | 2 +- server/helpers/peertube-crypto.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/database-utils.ts b/server/helpers/database-utils.ts index f761cfb89..e174dc3e9 100644 --- a/server/helpers/database-utils.ts +++ b/server/helpers/database-utils.ts @@ -17,7 +17,7 @@ function retryTransactionWrapper (functionToRetry: (... args) => Promise, o ) .catch(err => { // Do not throw the error, continue the process - logger.error(options.errorMessage, { error: err }) + logger.error(options.errorMessage, err) }) } diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts index 0c73e8539..89aef99c4 100644 --- a/server/helpers/peertube-crypto.ts +++ b/server/helpers/peertube-crypto.ts @@ -30,7 +30,7 @@ function checkSignature (publicKey: string, data: string, hexSignature: string) try { dataString = JSON.stringify(data) } catch (err) { - logger.error('Cannot check signature.', { error: err }) + logger.error('Cannot check signature.', err) return false } } @@ -51,7 +51,7 @@ function sign (data: string|Object) { try { dataString = JSON.stringify(data) } catch (err) { - logger.error('Cannot sign data.', { error: err }) + logger.error('Cannot sign data.', err) return Promise.resolve('') } } -- cgit v1.2.3