File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,9 @@ export default function SignPage() {
143
143
onCompleted ( response ) {
144
144
onCompleted ( response . loginByEmail ) ;
145
145
} ,
146
+ onError ( _error ) {
147
+ onError ( ) ;
148
+ } ,
146
149
} ) ;
147
150
} else {
148
151
loginByUsername ( {
@@ -154,6 +157,9 @@ export default function SignPage() {
154
157
onCompleted ( response ) {
155
158
onCompleted ( response . loginByUsername ) ;
156
159
} ,
160
+ onError ( _error ) {
161
+ onError ( ) ;
162
+ } ,
157
163
} ) ;
158
164
}
159
165
}
@@ -168,10 +174,16 @@ export default function SignPage() {
168
174
) {
169
175
setErrorCode ( data . loginErrorKind ) ;
170
176
} else {
171
- setErrorCode ( "UNKNOWN" ) ;
177
+ onError ( ) ;
172
178
}
173
179
}
174
180
181
+ function onError ( ) {
182
+ setChallenging ( false ) ;
183
+ setErrorCode ( "UNKNOWN" ) ;
184
+ setToken ( undefined ) ;
185
+ }
186
+
175
187
function getSignInMessage ( ) {
176
188
const currentToken = token ( ) ;
177
189
const currentErrorCode = errorCode ( ) ;
You can’t perform that action at this time.
0 commit comments