We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71a044d commit b8340ceCopy full SHA for b8340ce
src/http.js
@@ -71,14 +71,14 @@ export default async function http(url, request = {}) {
71
// so we'll just throw the error we got
72
throw resError;
73
}
74
- const error = new Error(res.statusText);
+ const error = new Error(res.statusText || `response status is ${res.status}`);
75
error.status = res.status;
76
error.statusCode = res.status;
77
error.responseError = resError;
78
throw error;
79
80
if (!res.ok) {
81
82
83
84
error.response = res;
0 commit comments