1
0
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:
Nicolas Constant 2020-06-08 19:10:24 -04:00
parent fef906da72
commit b423ca6b31
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688

View File

@ -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) { }