changeset 299:6b4df87a7ccc

refactor: console.log removed. Backend error while fetching users. Unnecessary console statement removed. The response.data and the status code are currently displayed in a toast.
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 31 Jul 2018 16:16:50 +0200
parents ba1178fbc64b
children af29878be602
files client/src/stores/usermanagement.js client/src/views/Users.vue
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/stores/usermanagement.js	Tue Jul 31 15:57:04 2018 +0200
+++ b/client/src/stores/usermanagement.js	Tue Jul 31 16:16:50 2018 +0200
@@ -29,7 +29,6 @@
             resolve(response);
           })
           .catch(error => {
-            console.log(error);
             reject(error);
           });
       });
--- a/client/src/views/Users.vue	Tue Jul 31 15:57:04 2018 +0200
+++ b/client/src/views/Users.vue	Tue Jul 31 16:16:50 2018 +0200
@@ -81,10 +81,11 @@
     store
       .dispatch("usermanagement/loadUsers")
       .then(next)
-      .catch(() => {
+      .catch(error => {
+        const { status, data } = error.response;
         app.$toast.error({
-          title: "Error",
-          message: "Backend Error"
+          title: "Backend Error",
+          message: `${status}: ${data}`
         });
       });
   }