mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-09-18 21:38:07 +00:00
show popup when chat API returns an error
This commit is contained in:
parent
ed68230811
commit
45212cbd56
1 changed files with 14 additions and 4 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue