better handling of errors message
This commit is contained in:
parent
fef906da72
commit
b423ca6b31
|
@ -29,8 +29,11 @@ export class NotificationService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
code = err.status;
|
code = err.status;
|
||||||
|
if(err.message){
|
||||||
|
message = err.message;
|
||||||
|
} else if(err.error && err.error.error) {
|
||||||
message = err.error.error; //Mastodon
|
message = err.error.error; //Mastodon
|
||||||
if (!message) {
|
} else if(err.error && err.error.errors && err.error.errors.detail){
|
||||||
message = err.error.errors.detail; //Pleroma
|
message = err.error.errors.detail; //Pleroma
|
||||||
}
|
}
|
||||||
} catch (err) { }
|
} catch (err) { }
|
||||||
|
|
Loading…
Reference in New Issue