[WEB-5508] fix: improve error handling in AuthFormRoot by ensuring safe access to error_code (#8178)
This commit is contained in:
parent
d38147b875
commit
3f11183768
1 changed files with 1 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ export const AuthFormRoot = observer(function AuthFormRoot(props: TAuthFormRoot)
|
|||
.generateUniqueCode(payload)
|
||||
.then(() => ({ code: "" }))
|
||||
.catch((error) => {
|
||||
const errorhandler = authErrorHandler(error?.error_code.toString());
|
||||
const errorhandler = authErrorHandler(error?.error_code?.toString());
|
||||
if (errorhandler?.type) setErrorInfo(errorhandler);
|
||||
throw error;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue