Skip to content

Commit

Permalink
Refactor to accomodate api change for AxiosError
Browse files Browse the repository at this point in the history
  • Loading branch information
kenoir committed Mar 19, 2024
1 parent 458343c commit 2604409
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions identity/webapp/src/frontend/hooks/useUpdatePassword.ts
Expand Up @@ -39,11 +39,7 @@ export function useUpdatePassword(): UseUpdatePasswordMutation {
.catch((err: AxiosError) => {
switch (err.response?.status) {
case 400: {
if (
err.response?.data.message.includes(
'PIN is not valid : PIN is trivial'
)
) {
if (err.message.includes('PIN is not valid : PIN is trivial')) {
setError(UpdatePasswordError.REPEATED_CHARACTERS);
break;
} else {
Expand Down

0 comments on commit 2604409

Please sign in to comment.