MCPcopy Create free account
hub / github.com/Effect-TS/effect / apiError

Function apiError

packages/chat/telegram/test/utils.ts:24–27  ·  view source on GitHub ↗
(code: number, description: string, parameters?: unknown)

Source from the content-addressed store, hash-verified

22
23/** A Bot API error answer, as Telegram sends it. */
24export const apiError = (code: number, description: string, parameters?: unknown) => ({
25 status: code,
26 body: { ok: false, error_code: code, description, ...(parameters === undefined ? {} : { parameters }) }
27})
28
29type Answer = { readonly status: number; readonly body: unknown }
30

Callers 2

answerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected