UNPKG

msal

Version:
36 lines 1.32 kB
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { __extends } from "tslib"; import { AuthError } from "./AuthError"; export var ServerErrorMessage = { serverUnavailable: { code: "server_unavailable", desc: "Server is temporarily unavailable." }, unknownServerError: { code: "unknown_server_error" }, }; /** * Error thrown when there is an error with the server code, for example, unavailability. */ var ServerError = /** @class */ (function (_super) { __extends(ServerError, _super); function ServerError(errorCode, errorMessage) { var _this = _super.call(this, errorCode, errorMessage) || this; _this.name = "ServerError"; Object.setPrototypeOf(_this, ServerError.prototype); return _this; } ServerError.createServerUnavailableError = function () { return new ServerError(ServerErrorMessage.serverUnavailable.code, ServerErrorMessage.serverUnavailable.desc); }; ServerError.createUnknownServerError = function (errorDesc) { return new ServerError(ServerErrorMessage.unknownServerError.code, errorDesc); }; return ServerError; }(AuthError)); export { ServerError }; //# sourceMappingURL=ServerError.js.map