From ff012cf0a3ea7535ec17f0ee5009615fd738fc09 Mon Sep 17 00:00:00 2001
From: Ildar Kamalov <i.kamalov@adguard.com>
Date: Tue, 19 Feb 2019 11:05:30 +0300
Subject: [PATCH] Fix error message

---
 client/src/api/Api.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/src/api/Api.js b/client/src/api/Api.js
index 688049c9..d20a334a 100644
--- a/client/src/api/Api.js
+++ b/client/src/api/Api.js
@@ -19,7 +19,7 @@ export default class Api {
             if (error.response) {
                 throw new Error(`${errorPath} | ${error.response.data} | ${error.response.status}`);
             }
-            throw new Error(`${errorPath} | ${error}`);
+            throw new Error(`${errorPath} | ${error.message ? error.message : error}`);
         }
     }