Skip to content

Commit

Permalink
Revert "feat: added error handler"
Browse files Browse the repository at this point in the history
This reverts commit acc2a94.

This does not work with AbortErrors. It yields `undefined`. No clue
what's the point of this
  • Loading branch information
sveneberth committed Dec 18, 2024
1 parent ce90591 commit d3f8134
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/HttpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ function request(url, {json, method, params, ...customConfig} = {}) {
const errorMessage = `${response.status} ${response.statusText}: ${response.headers.get('x-viur-error')}`
return Promise.reject(new HTTPError(response.status, response.statusText, errorMessage, response))
}
}).catch((error) => {
const errorMessage = `${error.statusCode} ${error.statusText}: ${error.response.headers.get('x-viur-error')}`
return Promise.reject(new HTTPError(error.statusCode, error.statusText, errorMessage, error))
})
}

Expand Down

0 comments on commit d3f8134

Please sign in to comment.