(1138) - Fixed HTTPResponseError with correct constructor and usage (#1666)
Co-authored-by: Dhananjay Agrawal <dhananjay.agrawal@aexp.com>
This commit is contained in:
parent
6f72caa401
commit
c071406e19
|
@ -269,8 +269,8 @@ It is common to create a helper function to check that the response contains no
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
|
|
||||||
class HTTPResponseError extends Error {
|
class HTTPResponseError extends Error {
|
||||||
constructor(response, ...args) {
|
constructor(response) {
|
||||||
super(`HTTP Error Response: ${response.status} ${response.statusText}`, ...args);
|
super(`HTTP Error Response: ${response.status} ${response.statusText}`);
|
||||||
this.response = response;
|
this.response = response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue