chore: update error message handler

This commit is contained in:
Steven
2022-08-20 07:34:39 +08:00
parent a98e64cf0a
commit f06a3d171b
15 changed files with 42 additions and 27 deletions

View File

@ -64,7 +64,8 @@ const PreferencesSection: React.FC<Props> = () => {
try {
await api.createUser(userCreate);
} catch (error: any) {
toastHelper.error(error.message);
console.error(error);
toastHelper.error(error.response.data.message);
}
await fetchUserList();
setState({