File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
packages/template-retail-react-app/app/pages Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ const Login = ({initialView = LOGIN_VIEW}) => {
153153
154154 const passwordlessLogin = async ( ) => {
155155 try {
156- const res = await loginPasswordless . mutateAsync ( { pwdlessLoginToken : token } )
156+ await loginPasswordless . mutateAsync ( { pwdlessLoginToken : token } )
157157 } catch ( e ) {
158158 const errorData = await e . response ?. json ( )
159159 const message = / i n v a l i d t o k e n / i. test ( errorData . message )
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ const ResetPasswordLanding = () => {
4646 await resetPassword ( { email, token, newPassword : values . password } )
4747 navigate ( '/login' )
4848 } catch ( error ) {
49- const message = / U n a u t h o r i z e d / i. test ( error . message )
49+ const errorData = await error . response ?. json ( )
50+ const message = / i n v a l i d t o k e n / i. test ( errorData . message )
5051 ? formatMessage ( INVALID_TOKEN_ERROR_MESSAGE )
5152 : formatMessage ( API_ERROR_MESSAGE )
5253 form . setError ( 'global' , { type : 'manual' , message} )
You can’t perform that action at this time.
0 commit comments