MCPcopy Index your code
hub / github.com/anomalyco/opencode / apiError

Function apiError

packages/opencode/test/session/retry.test.ts:21–29  ·  view source on GitHub ↗
(headers?: Record<string, string>)

Source from the content-addressed store, hash-verified

19const it = testEffect(LayerNode.compile(LayerNode.group([SessionStatus.node, CrossSpawnSpawner.node])))
20
21function apiError(headers?: Record<string, string>): SessionV1.APIError {
22 return Schema.decodeUnknownSync(SessionV1.APIError.Schema)(
23 new SessionV1.APIError({
24 message: "boom",
25 isRetryable: true,
26 responseHeaders: headers,
27 }).toObject(),
28 )
29}
30
31function wrap(message: unknown): ReturnType<NamedError["toObject"]> {
32 return { name: "", data: { message } }

Callers 1

retry.test.tsFile · 0.85

Calls 1

toObjectMethod · 0.45

Tested by

no test coverage detected