From 6351986bfa78e7b4ac8e7da076bb7a93e5802d1a Mon Sep 17 00:00:00 2001 From: bobobo1618 Date: Thu, 11 Apr 2019 22:56:30 +0200 Subject: [PATCH] Remove .toString() from disk error handling For the most part, error messages look like: ```js { error: { errno: -2, code: 'ENOENT', syscall: 'stat', path: '/data/path/stuff/place' } } ``` But `toString()` just turns it into `[object Object]`, which is quite useless as a log message. --- backend/model/threading/DiskMangerWorker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/model/threading/DiskMangerWorker.ts b/backend/model/threading/DiskMangerWorker.ts index 0641fad0..1b199d06 100644 --- a/backend/model/threading/DiskMangerWorker.ts +++ b/backend/model/threading/DiskMangerWorker.ts @@ -116,7 +116,7 @@ export class DiskMangerWorker { return resolve(directory); } catch (err) { - return reject({error: err.toString()}); + return reject({error: err}); } });