Skip to content

Commit

Permalink
Throw when res from execute is an error
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Feb 3, 2021
1 parent 5fb7113 commit 97c6913
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x-pack/plugins/case/server/routes/api/cases/push_case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export function initPushCaseApi({
},
});

if (pushRes.status === 'error') {
throw new Error(pushRes.serviceMessage ?? pushRes.message ?? 'Error pushing to service');
}

/* End of push to external service */

/* Start of update case with push information */
Expand Down

0 comments on commit 97c6913

Please sign in to comment.