fix: empty error toast when renaming or deleting a channel fails (#35324)

When the server rejected a channel rename or delete, for example because the channel was already deleted in another tab, an empty red toast appeared. The toast now shows the server's error message.

Fixes #35323
This commit is contained in:
Classic298 authored and GitHub committed 2026-11-30 23:53:11 +04:00
1 parent 236ddf2819
commit b47fc1d57c
2 files changed
+2 -2

No files matched your search

@@ -64,7 +64,7 @@
group_ids,
user_ids
}).catch((error) => {
toast.error(error.message);
toast.error(`${error}`);
});
if (res) {
@@ -118,7 +118,7 @@
const channelId = channel.id;
const res = await deleteChannelById(localStorage.token, channelId).catch((error) => {
toast.error(error.message);
toast.error(`${error}`);
});
if (res) {