fix AuthError object

This commit is contained in:
blagoev 2017-09-12 23:02:14 +03:00
parent 9366de14ef
commit eba51066d9

View File

@ -19,7 +19,12 @@
'use strict'; 'use strict';
function AuthError(problem) { function AuthError(problem) {
Error.call(this, problem.title); const error = Error.call(this, problem.title);
this.name = 'AuthError';
this.message = error.message;
this.stack = error.stack;
Object.assign(this, problem); Object.assign(this, problem);
} }