mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-03 20:21:40 +00:00
chore: fix error message
This commit is contained in:
@ -54,7 +54,7 @@ const ChangePasswordDialog: React.FC<Props> = (props: Props) => {
|
||||
toast("Password changed");
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error(error.response.data.message);
|
||||
toast.error(error.details);
|
||||
}
|
||||
requestState.setFinish();
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
|
||||
onClose();
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error(error.response.data.message);
|
||||
toast.error(error.details);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -207,7 +207,7 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error(error.response.data.message);
|
||||
toast.error(error.details);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -118,7 +118,7 @@ const CreateUserDialog: React.FC<Props> = (props: Props) => {
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error(error.response.data.message);
|
||||
toast.error(error.details);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ const EditUserinfoDialog: React.FC<Props> = (props: Props) => {
|
||||
toast("User information updated");
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error(error.response.data.message);
|
||||
toast.error(error.details);
|
||||
}
|
||||
requestState.setFinish();
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ const MemberSection = () => {
|
||||
await userStore.deleteUser(user.id);
|
||||
toast.success(`User \`${user.nickname}\` deleted successfully`);
|
||||
} catch (error: any) {
|
||||
toast.error(`Failed to delete user \`${user.nickname}\`: ${error.response.data.message}`);
|
||||
toast.error(`Failed to delete user \`${user.nickname}\`: ${error.details}`);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user