34 lines
1.4 KiB
JavaScript
34 lines
1.4 KiB
JavaScript
/*! @azure/msal-react v3.0.17 2025-08-05 */
|
|
'use strict';
|
|
import { AuthError } from '@azure/msal-browser';
|
|
|
|
/*
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License.
|
|
*/
|
|
const ReactAuthErrorMessage = {
|
|
invalidInteractionType: {
|
|
code: "invalid_interaction_type",
|
|
desc: "The provided interaction type is invalid.",
|
|
},
|
|
unableToFallbackToInteraction: {
|
|
code: "unable_to_fallback_to_interaction",
|
|
desc: "Interaction is required but another interaction is already in progress. Please try again when the current interaction is complete.",
|
|
},
|
|
};
|
|
class ReactAuthError extends AuthError {
|
|
constructor(errorCode, errorMessage) {
|
|
super(errorCode, errorMessage);
|
|
Object.setPrototypeOf(this, ReactAuthError.prototype);
|
|
this.name = "ReactAuthError";
|
|
}
|
|
static createInvalidInteractionTypeError() {
|
|
return new ReactAuthError(ReactAuthErrorMessage.invalidInteractionType.code, ReactAuthErrorMessage.invalidInteractionType.desc);
|
|
}
|
|
static createUnableToFallbackToInteractionError() {
|
|
return new ReactAuthError(ReactAuthErrorMessage.unableToFallbackToInteraction.code, ReactAuthErrorMessage.unableToFallbackToInteraction.desc);
|
|
}
|
|
}
|
|
|
|
export { ReactAuthError, ReactAuthErrorMessage };
|
|
//# sourceMappingURL=ReactAuthError.js.map
|