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 isFunction = require('lodash/isFunction');
|
||||||
|
|
||||||
const Attachment = require('./attachment');
|
const Attachment = require('./attachment');
|
||||||
|
const Errors = require('./errors');
|
||||||
const SchemaVersion = require('./schema_version');
|
const SchemaVersion = require('./schema_version');
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,8 +111,7 @@ exports._withSchemaVersion = (schemaVersion, upgrade) => {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(
|
console.log(
|
||||||
'Message._withSchemaVersion: error:',
|
'Message._withSchemaVersion: error:',
|
||||||
// TODO: Use `Errors.toLogFormat`:
|
Errors.toLogFormat(error)
|
||||||
error && error.stack ? error.stack : error
|
|
||||||
);
|
);
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue