boxerror: remove usage of Object.assign
This commit is contained in:
+5
-1
@@ -74,7 +74,11 @@ BoxError.TIMEOUT = 'Timeout';
|
||||
BoxError.TRY_AGAIN = 'Try Again';
|
||||
|
||||
BoxError.prototype.toPlainObject = function () {
|
||||
return Object.assign({}, { message: this.message, reason: this.reason }, this.details);
|
||||
return {
|
||||
message: this.message,
|
||||
reason: this.reason,
|
||||
details: this.details
|
||||
};
|
||||
};
|
||||
|
||||
// this is a class method for now in case error is not a BoxError
|
||||
|
||||
Reference in New Issue
Block a user