1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

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.
This commit is contained in:
bobobo1618 2019-04-11 22:56:30 +02:00 committed by GitHub
parent 9e6247ae57
commit 6351986bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,7 @@ export class DiskMangerWorker {
return resolve(directory);
} catch (err) {
return reject({error: err.toString()});
return reject({error: err});
}
});