Skip to content

Commit

Permalink
(1138) - Fixed HTTPResponseError with correct constructor and usage (#…
Browse files Browse the repository at this point in the history
…1666)

Co-authored-by: Dhananjay Agrawal <dhananjay.agrawal@aexp.com>
  • Loading branch information
dhananjaysa92 and Dhananjay Agrawal committed Oct 30, 2022
1 parent 6f72caa commit c071406
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -269,8 +269,8 @@ It is common to create a helper function to check that the response contains no
import fetch from 'node-fetch';

class HTTPResponseError extends Error {
constructor(response, ...args) {
super(`HTTP Error Response: ${response.status} ${response.statusText}`, ...args);
constructor(response) {
super(`HTTP Error Response: ${response.status} ${response.statusText}`);
this.response = response;
}
}
Expand Down

0 comments on commit c071406

Please sign in to comment.