Skip to content

Commit

Permalink
fix: fixes password out of date error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
YazeedLoonat committed Feb 28, 2024
1 parent 652f5a1 commit c7381dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared-helpers/src/auth/catchNetworkError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type NetworkErrorDetermineError = (
export type NetworkErrorReset = () => void

export enum NetworkErrorMessage {
PasswordOutdated = "passwordOutdated",
PasswordOutdated = "but password is no longer valid",
MfaUnauthorized = "mfaUnauthorized",
}

Expand All @@ -38,7 +38,7 @@ export const useCatchNetworkError = () => {
const [networkError, setNetworkError] = useState<NetworkStatusContent>(null)

const check401Error = (message: string, error: AxiosError) => {
if (message === NetworkErrorMessage.PasswordOutdated) {
if (message.includes(NetworkErrorMessage.PasswordOutdated)) {
setNetworkError({
title: t("authentication.signIn.passwordOutdated"),
description: `${t(
Expand Down

0 comments on commit c7381dd

Please sign in to comment.