MCPcopy Create free account
hub / github.com/wevm/viem / constructor

Method constructor

src/errors/request.ts:69–90  ·  view source on GitHub ↗
({
    body,
    cause,
    details,
    url,
  }: {
    body?: { [key: string]: unknown } | undefined
    cause?: Error | undefined
    details?: string | undefined
    url: string
  })

Source from the content-addressed store, hash-verified

67export class WebSocketRequestError extends BaseError {
68 url: string
69 constructor({
70 body,
71 cause,
72 details,
73 url,
74 }: {
75 body?: { [key: string]: unknown } | undefined
76 cause?: Error | undefined
77 details?: string | undefined
78 url: string
79 }) {
80 super('WebSocket request failed.', {
81 cause,
82 details,
83 metaMessages: [
84 `URL: ${getUrl(url)}`,
85 body && `Request body: ${stringify(body)}`,
86 ].filter(Boolean) as string[],
87 name: 'WebSocketRequestError',
88 })
89 this.url = url
90 }
91}
92
93export type RpcRequestErrorType = RpcRequestError & {

Callers

nothing calls this directly

Calls 2

getUrlFunction · 0.85
stringifyFunction · 0.85

Tested by

no test coverage detected