Skip to content

Commit 38a86e0

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(tools): retain bounded request size diagnostics
1 parent f39c0fd commit 38a86e0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

apps/sim/tools/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2692,7 +2692,13 @@ async function executeDeclaredInternalOperation({
26922692
try {
26932693
stringifyRequestWithinLimit(operationInput, MAX_REQUEST_BODY_SIZE_BYTES)
26942694
} catch (error) {
2695-
if (isPayloadSizeLimitError(error)) throw new Error(BODY_SIZE_LIMIT_ERROR_MESSAGE)
2695+
if (isPayloadSizeLimitError(error)) {
2696+
logger.error(`[${requestId}] Request body size exceeds limit for ${toolId}:`, {
2697+
bodySizeLowerBound: error.observedBytes,
2698+
maxSize: error.maxBytes,
2699+
})
2700+
throw new Error(BODY_SIZE_LIMIT_ERROR_MESSAGE)
2701+
}
26962702
throw error
26972703
}
26982704
const deadline = serializeExecutionDeadlineHeader(signal)

0 commit comments

Comments
 (0)