From 135bbaf6441337569d0b5c1c1877f25d149ba952 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Mon, 16 Feb 2015 13:45:17 +0300 Subject: [PATCH] Handling 400 error with invalid/empty query Closes #700 --- app/js/services.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/js/services.js b/app/js/services.js index 13661dba..d24f1cbc 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -1166,6 +1166,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) count: foundCount, history: foundMsgs }; + }, function (error) { + if (error.code == 400) { + error.handled = true; + } + return $q.reject(error); }); }