From 4db5bd80076c021a95da417119664f7354923997 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 18 Oct 2014 14:27:36 +0200 Subject: [PATCH] Changed tag presenter to show meaningful errors --- public_html/js/Presenters/TagPresenter.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public_html/js/Presenters/TagPresenter.js b/public_html/js/Presenters/TagPresenter.js index e4f8bc26..054ee2c9 100644 --- a/public_html/js/Presenters/TagPresenter.js +++ b/public_html/js/Presenters/TagPresenter.js @@ -106,8 +106,7 @@ App.Presenters.TagPresenter = function( render(); renderPosts(posts); }).fail(function(response) { - console.log(response); - window.alert('An error occurred'); + window.alert(response.json && response.json.error || 'An error occured.'); }); }