Use Errors.toLogFormat

This commit is contained in:
Daniel Gasienica
2018-03-19 19:27:59 -04:00
parent cd3aee962d
commit 0e20e8e2ea
+2 -2
View File
@@ -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;
}