MCPcopy Create free account
hub / github.com/ThatGuySam/doesitarm / constructor

Method constructor

helpers/http.js:45–66  ·  view source on GitHub ↗
( message, {
        cause,
        data = null,
        method,
        status,
        statusText,
        url
    } )

Source from the content-addressed store, hash-verified

43
44export 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
69async function parseResponseBody ( response, responseType ) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected