Added another error object message detection

This commit is contained in:
Torkel Ödegaard
2019-02-06 21:35:01 +01:00
parent baeec495a2
commit 7edc3fdd5c

View File

@ -6,6 +6,8 @@ export function getMessageFromError(err: any): string | null {
return err.message;
} else if (err.data && err.data.message) {
return err.data.message;
} else if (err.statusText) {
return err.statusText;
} else {
return JSON.stringify(err);
}