From: sebdet Date: Wed, 22 Apr 2020 21:10:54 +0000 (+0200) Subject: Fix bug when adding op policy X-Git-Tag: 5.0.5~3^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=614956d2662db39e4daf99da1b8302001bd2d8c2;p=clamp.git Fix bug when adding op policy The fix to prevent multiple op policy modle to be inserted introduced another bug, this pr fixes it Issue-ID: CLAMP-828 Signed-off-by: sebdet Change-Id: I90432688df48cbf2b456efae5e4191e2909077cc --- diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js index 3b9ed86f..8f9805e3 100644 --- a/ui-react/src/api/LoopService.js +++ b/ui-react/src/api/LoopService.js @@ -233,9 +233,9 @@ export default class LoopService { return response.text(); } }) - .then(function (object) { + .catch(function (error) { console.error("Add Operational Policy query failed"); - throw new Error(object); + throw new Error(error); }) }