MCPcopy
hub / github.com/AutoMaker-Org/automaker / getErrorMessage

Function getErrorMessage

apps/server/src/routes/mcp/common.ts:12–17  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

10 * Extract error message from unknown error
11 */
12export function getErrorMessage(error: unknown): string {
13 if (error instanceof Error) {
14 return error.message;
15 }
16 return String(error);
17}
18
19/**
20 * Log error with prefix

Callers 15

createIndexHandlerFunction · 0.50
createUpdateHandlerFunction · 0.50
createArchiveHandlerFunction · 0.50
createCreateHandlerFunction · 0.50
createDeleteHandlerFunction · 0.50
createUnarchiveHandlerFunction · 0.50
createDismissHandlerFunction · 0.50
createMarkReadHandlerFunction · 0.50
createListHandlerFunction · 0.50
createUnreadCountHandlerFunction · 0.50
createDirectoriesHandlerFunction · 0.50
createConfigHandlerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected