Skip to content

Commit

Permalink
enhance axios error details (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
carrolp authored Jun 1, 2023
1 parent a4023dd commit 64b8902
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ function axiosErr_to_requestErr( axiosErr ) {
Nevertheless, `err.statusCode` will return the request-style value.
*/

// Some code will look for e.error.message and e.error.code from request errors
axiosErr.error = axiosErr.content;

return axiosErr;
}

Expand Down

0 comments on commit 64b8902

Please sign in to comment.