Skip to content

Commit cab9a2f

Browse files
hotfix: return user-friendly error on sing-in page (#5687)
* hotfix: return user-friendly error on sing-in page * hotfix: return user-friendly error on sing-in page (cherry picked from commit d1fc830)
1 parent e02e454 commit cab9a2f

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

apps/callcenter

apps/condo/domains/user/components/auth/SignInForm.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { colors } from '@condo/domains/common/constants/style'
1616
import { runMutation } from '@condo/domains/common/utils/mutations.utils'
1717
import { isSafeUrl } from '@condo/domains/common/utils/url.utils'
1818
import { ResponsiveCol } from '@condo/domains/user/components/containers/ResponsiveCol'
19-
import { WRONG_PASSWORD_ERROR, WRONG_PHONE_ERROR } from '@condo/domains/user/constants/errors'
19+
import { WRONG_CREDENTIALS } from '@condo/domains/user/constants/errors'
2020
import { SIGNIN_BY_PHONE_AND_PASSWORD_MUTATION } from '@condo/domains/user/gql'
2121

2222
import { AgreementText } from './AgreementText'
@@ -58,12 +58,8 @@ export const SignInForm = (): React.ReactElement => {
5858
// TODO(DOMA-3293): remove this legacy error style and Useless error messages
5959
const ErrorToFormFieldMsgMapping = useMemo(() => {
6060
return {
61-
[WRONG_PHONE_ERROR]: {
62-
name: 'signinError',
63-
errors: [PasswordOrPhoneMismatch],
64-
},
65-
[WRONG_PASSWORD_ERROR]: {
66-
name: 'signinError',
61+
[WRONG_CREDENTIALS]: {
62+
name: 'phone',
6763
errors: [PasswordOrPhoneMismatch],
6864
},
6965
}

0 commit comments

Comments
 (0)