Use Errors.toLogFormat
This commit is contained in:
parent
cd3aee962d
commit
0e20e8e2ea
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
const isFunction = require('lodash/isFunction');
|
||||
|
||||
const Attachment = require('./attachment');
|
||||
const Errors = require('./errors');
|
||||
const SchemaVersion = require('./schema_version');
|
||||
|
||||
|
||||
|
@ -110,8 +111,7 @@ exports._withSchemaVersion = (schemaVersion, upgrade) => {
|
|||
} catch (error) {
|
||||
console.log(
|
||||
'Message._withSchemaVersion: error:',
|
||||
// TODO: Use `Errors.toLogFormat`:
|
||||
error && error.stack ? error.stack : error
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
return message;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue