Skip to content

Commit

Permalink
feat(Http): Assign error object to http error (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
nduchak committed Nov 11, 2019
1 parent c5f2582 commit 87062ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion es/utils/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const processResponse = async (res) => {
if (!e.response) throw e
throw Object.assign(
Error(`Http request for ${e.config.url} failed with status code ${e.response.status}. Status: ${e.response.statusText}. \nError data: ${JSON.stringify(e.response.data)}`),
{ data: e.response.data }
{ error: e }
)
}
}
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 87062ea

Please sign in to comment.