Skip to content

Commit 278b8e1

Browse files
authored
Merge pull request #30 from FoxComm/bugfix/use-error-body
Use response body for errors
2 parents 6c3f028 + 41cfc0f commit 278b8e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default function request(method, uri, data, options) {
8989

9090
error = new Error(err.message || String(err));
9191
error.response = err.response;
92-
error.responseJson = err.response;
92+
error.responseJson = err.response.body;
9393

9494
const message = `${method.toUpperCase()} ${uri} responded with ${err.statusCode}`;
9595
debug(message);

0 commit comments

Comments
 (0)