MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createErrorMessage

Function createErrorMessage

cli/src/utils/error-handling.ts:215–227  ·  view source on GitHub ↗
(
  error: unknown,
  aiMessageId: string,
)

Source from the content-addressed store, hash-verified

213 : 'Free mode is not available in your country. You can use another mode to continue.'
214
215export const createErrorMessage = (
216 error: unknown,
217 aiMessageId: string,
218): Partial<ChatMessage> => {
219 const message = extractErrorMessage(error, 'Unknown error occurred')
220
221 return {
222 id: aiMessageId,
223 content: `**Error:** ${message}`,
224 blocks: undefined,
225 isComplete: true,
226 }
227}

Callers 1

Calls 1

extractErrorMessageFunction · 0.70

Tested by

no test coverage detected