spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / telemetry / hooks / batching / message-of / message-of.ts
9 lines · 311 BRaw
1/**
2 * What a batch's failure says, for the refusal each of its rows rejects
3 * with: the error's own message, or the value as text.
4 *
5 * @param error what sending the batch threw
6 * @returns the message
7 */
8export const messageOf = (error: unknown) =>
9 error instanceof Error ? error.message : String(error)