chore: update error message handler

This commit is contained in:
Steven
2023-06-25 23:01:13 +08:00
parent 96e858f08c
commit b0b8d746c8
5 changed files with 7 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ const Auth: React.FC = () => {
}
} catch (error: any) {
console.error(error);
toast.error(JSON.stringify(error.response.data));
toast.error(error.response.data.message);
}
actionBtnLoadingState.setFinish();
};
@@ -68,7 +68,7 @@ const Auth: React.FC = () => {
}
} catch (error: any) {
console.error(error);
toast.error(JSON.stringify(error.response.data));
toast.error(error.response.data.message);
}
actionBtnLoadingState.setFinish();
};