mirror of
https://github.com/NicolasConstant/sengi
synced 2025-01-31 10:44:55 +01:00
better handling of errors message
This commit is contained in:
parent
fef906da72
commit
b423ca6b31
@ -29,8 +29,11 @@ export class NotificationService {
|
||||
|
||||
try {
|
||||
code = err.status;
|
||||
message = err.error.error; //Mastodon
|
||||
if (!message) {
|
||||
if(err.message){
|
||||
message = err.message;
|
||||
} else if(err.error && err.error.error) {
|
||||
message = err.error.error; //Mastodon
|
||||
} else if(err.error && err.error.errors && err.error.errors.detail){
|
||||
message = err.error.errors.detail; //Pleroma
|
||||
}
|
||||
} catch (err) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user