( message, {
cause,
data = null,
method,
status,
statusText,
url
} )
| 43 | |
| 44 | export class HttpError extends Error { |
| 45 | constructor ( message, { |
| 46 | cause, |
| 47 | data = null, |
| 48 | method, |
| 49 | status, |
| 50 | statusText, |
| 51 | url |
| 52 | } ) { |
| 53 | super( message ) |
| 54 | |
| 55 | this.name = 'HttpError' |
| 56 | this.cause = cause |
| 57 | this.method = method |
| 58 | this.status = status |
| 59 | this.url = url |
| 60 | this.response = { |
| 61 | data, |
| 62 | status, |
| 63 | statusText, |
| 64 | url |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | async function parseResponseBody ( response, responseType ) { |
nothing calls this directly
no outgoing calls
no test coverage detected