From c2d9cf466d88493fa5d570caf95542f6c6ea0d9f Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Wed, 6 Apr 2016 15:48:00 -0400 Subject: [PATCH] fixed error handling of options --- awx/ui/client/src/search/tagSearch.service.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/awx/ui/client/src/search/tagSearch.service.js b/awx/ui/client/src/search/tagSearch.service.js index 93d4819901..4f8f7fa48a 100644 --- a/awx/ui/client/src/search/tagSearch.service.js +++ b/awx/ui/client/src/search/tagSearch.service.js @@ -93,18 +93,19 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', function(R value: i[0], label: i[1] }; - }); - - return option; + }); + return option; + }); + Wait("stop"); + defer.resolve(joinOptions()); }) .error(function (data, status) { + Wait("stop"); + defer.reject("options request failed"); ProcessErrors(null, data, status, null, { hdr: 'Error!', msg: 'Getting type options failed'}); }); - Wait("stop"); - defer.resolve(joinOptions()); - }); } else { Wait("stop"); defer.resolve(joinOptions());