msal
Version:
Microsoft Authentication Library for js
29 lines • 1.06 kB
JavaScript
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as tslib_1 from "tslib";
export var 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(AuthErrorMessage.unexpectedError.code, AuthErrorMessage.unexpectedError.desc + ": " + errDesc);
};
return AuthError;
}(Error));
export { AuthError };
//# sourceMappingURL=AuthError.js.map