Move MailError to BoxError

This commit is contained in:
Girish Ramakrishnan
2019-10-24 13:34:14 -07:00
parent a017af41c5
commit 1a8496d61e
8 changed files with 156 additions and 223 deletions

View File

@@ -60,3 +60,9 @@ BoxError.UNKNOWN_ERROR = 'Unknown Error'; // only used for porting
BoxError.prototype.toPlainObject = function () {
return _.extend({}, { message: this.message, reason: this.reason }, this.details);
};
BoxError.prototype.setMessage = function (message) {
assert.strictEqual(typeof message, 'string');
this.message = message;
};