Skip to content

Commit c071406

Browse files
dhananjaysa92Dhananjay Agrawal
andauthored
(1138) - Fixed HTTPResponseError with correct constructor and usage (#1666)
Co-authored-by: Dhananjay Agrawal <[email protected]>
1 parent 6f72caa commit c071406

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ It is common to create a helper function to check that the response contains no
269269
import fetch from 'node-fetch';
270270

271271
class HTTPResponseError extends Error {
272-
constructor(response, ...args) {
273-
super(`HTTP Error Response: ${response.status} ${response.statusText}`, ...args);
272+
constructor(response) {
273+
super(`HTTP Error Response: ${response.status} ${response.statusText}`);
274274
this.response = response;
275275
}
276276
}

0 commit comments

Comments
 (0)