Mailspring/packages/nylas-sync/sync-utils.js
Juan Tejada 8b1f012a3c Fix error serialization
- Remove cumbersome NylasError
- Add helper to serialize error when saving to account
2016-07-01 15:49:47 -07:00

11 lines
164 B
JavaScript

function jsonError(error) {
return {
message: error.message,
stack: error.stack ? error.stack.split('\n') : [],
}
}
module.exports = {
jsonError,
}