msal
Version:
Microsoft Authentication Library for js
31 lines • 1.16 kB
JavaScript
;
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
exports.AuthErrorMessage = {
unexpectedError: {
code: "unexpected_error",
desc: "Unexpected error in authentication."
}
};
/**
* General error class thrown by the MSAL.js library.
*/
var AuthError = /** @class */ (function (_super) {
tslib_1.__extends(AuthError, _super);
function AuthError(errorCode, errorMessage) {
var _this = _super.call(this, errorMessage) || this;
Object.setPrototypeOf(_this, AuthError.prototype);
_this.errorCode = errorCode;
_this.errorMessage = errorMessage;
_this.name = "AuthError";
return _this;
}
AuthError.createUnexpectedError = function (errDesc) {
return new AuthError(exports.AuthErrorMessage.unexpectedError.code, exports.AuthErrorMessage.unexpectedError.desc + ": " + errDesc);
};
return AuthError;
}(Error));
exports.AuthError = AuthError;
//# sourceMappingURL=AuthError.js.map