Method
constructor
({
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
| 67 | export 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 | |
| 93 | export type RpcRequestErrorType = RpcRequestError & { |
Callers
nothing calls this directly
Tested by
no test coverage detected