show popup when chat API returns an error

This commit is contained in:
Hazelnoot 2025-07-26 19:14:49 -04:00
parent ed68230811
commit 45212cbd56

View file

@ -194,8 +194,13 @@ function send() {
}).then(message => {
clear();
}).catch(err => {
console.error(err);
}).then(() => {
console.error('Error in chat:', err);
return os.alert({
type: 'error',
title: i18n.ts.error,
text: String(err),
});
}).finally(() => {
sending.value = false;
});
} else if (props.room) {
@ -206,8 +211,13 @@ function send() {
}).then(message => {
clear();
}).catch(err => {
console.error(err);
}).then(() => {
console.error('Error in chat:', err);
return os.alert({
type: 'error',
title: i18n.ts.error,
text: String(err),
});
}).finally(() => {
sending.value = false;
});
}