Pārlūkot izejas kodu

Added another error object message detection

Torkel Ödegaard 6 gadi atpakaļ
vecāks
revīzija
7edc3fdd5c
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      public/app/core/utils/errors.ts

+ 2 - 0
public/app/core/utils/errors.ts

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