MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeConsoleError

Function normalizeConsoleError

apps/sim/stores/terminal/console/utils.ts:230–242  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

228 * Normalizes terminal error data before it is stored.
229 */
230export function normalizeConsoleError(error: unknown): string | null | undefined {
231 if (error === undefined) {
232 return undefined
233 }
234
235 if (error === null) {
236 return null
237 }
238
239 return truncateString(
240 typeof error === 'string' ? error : safeConsoleStringify(normalizeConsoleValue(error))
241 )
242}
243
244/**
245 * Returns a workflow's entries trimmed to the configured cap.

Callers 3

notifyBlockErrorFunction · 0.90
store.tsFile · 0.90
hydrateConsoleStoreFunction · 0.90

Calls 3

safeConsoleStringifyFunction · 0.85
normalizeConsoleValueFunction · 0.85
truncateStringFunction · 0.70

Tested by

no test coverage detected