Skip to content

Commit b158969

Browse files
committed
fix(debug): add HTTP status to verbose log
1 parent 7d5ac23 commit b158969

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/request.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ export default class Request {
4343
}
4444

4545
async text(url, options = {}) {
46-
return this.fetch(url, options).then(res => res.text());
46+
const res = await this.fetch(url, options);
47+
if (isDebugVerbosity()) {
48+
debuglog('[Request] Got response from', url, ':\n', res.status, ' ', res.statusText);
49+
}
50+
return res.text();
4751
}
4852

4953
async json(url, options = {}) {

0 commit comments

Comments
 (0)