diff --git a/js/apps/system/users/errors.js b/js/apps/system/users/errors.js index 59a268dd22..b8fb47e405 100644 --- a/js/apps/system/users/errors.js +++ b/js/apps/system/users/errors.js @@ -5,11 +5,17 @@ function UserNotFound(uid) { this.message = 'User with user id ' + uid + ' not found.'; + var err = new Error(this.message); + err.name = this.constructor.name; + this.stack = err.stack; } UserNotFound.prototype = new Error(); function UsernameNotAvailable(username) { this.message = 'The username ' + username + ' is not available or already taken.'; + var err = new Error(this.message); + err.name = this.constructor.name; + this.stack = err.stack; } UsernameNotAvailable.prototype = new Error();