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
1 changed files with 5 additions and 2 deletions

View File

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