From 7edc3fdd5c45b487a17a76ff9dda369aa930698b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 6 Feb 2019 21:35:01 +0100 Subject: [PATCH] Added another error object message detection --- public/app/core/utils/errors.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app/core/utils/errors.ts b/public/app/core/utils/errors.ts index 52a7c39f713..3f6f1cfbc8d 100644 --- a/public/app/core/utils/errors.ts +++ b/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); }