MCPcopy
hub / github.com/KeygraphHQ/shannon / truncateStackTrace

Function truncateStackTrace

apps/worker/src/temporal/activities.ts:95–99  ·  view source on GitHub ↗

* Truncate stack trace on an ApplicationFailure to prevent buffer overflow.

(failure: ApplicationFailure)

Source from the content-addressed store, hash-verified

93 * Truncate stack trace on an ApplicationFailure to prevent buffer overflow.
94 */
95function truncateStackTrace(failure: ApplicationFailure): void {
96 if (failure.stack && failure.stack.length > MAX_STACK_TRACE_LENGTH) {
97 failure.stack = `${failure.stack.slice(0, MAX_STACK_TRACE_LENGTH)}\n[stack truncated]`;
98 }
99}
100
101/**
102 * Build SessionMetadata from ActivityInput.

Callers 3

runAgentActivityFunction · 0.85
runPreflightValidationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected