UNPKG

msal

Version:
38 lines 1.39 kB
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { __extends } from "tslib"; export var AuthErrorMessage = { unexpectedError: { code: "unexpected_error", desc: "Unexpected error in authentication." }, noWindowObjectError: { code: "no_window_object", desc: "No window object available. Details:" } }; /** * General error class thrown by the MSAL.js library. */ var AuthError = /** @class */ (function (_super) { __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(AuthErrorMessage.unexpectedError.code, AuthErrorMessage.unexpectedError.desc + ": " + errDesc); }; AuthError.createNoWindowObjectError = function (errDesc) { return new AuthError(AuthErrorMessage.noWindowObjectError.code, AuthErrorMessage.noWindowObjectError.desc + " " + errDesc); }; return AuthError; }(Error)); export { AuthError }; //# sourceMappingURL=AuthError.js.map