Skip to content

Commit

Permalink
Merge pull request #5039 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…5024-to-release-4.4

[release-4.4] Bug 1823452: Fix error handling in coFetch to return json.error
  • Loading branch information
openshift-merge-robot committed Apr 17, 2020
2 parents d630714 + 65cb3e4 commit ed7d6a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/public/co-fetch.js
Expand Up @@ -65,10 +65,10 @@ const validateStatus = (response, url) => {
reason = json.message;
}
if (!reason) {
reason = response.statusText;
reason = json.error;
}
if (!reason) {
reason = json.error;
reason = response.statusText;
}
const error = new Error(reason);
error.response = response;
Expand Down

0 comments on commit ed7d6a6

Please sign in to comment.