MCPcopy
hub / github.com/simstudioai/sim / isBodySizeLimitError

Function isBodySizeLimitError

apps/sim/tools/index.ts:724–734  ·  view source on GitHub ↗

* Checks if an error message indicates a body size limit issue * @param errorMessage - The error message to check * @returns true if the error is related to body size limits

(errorMessage: string)

Source from the content-addressed store, hash-verified

722 * @returns true if the error is related to body size limits
723 */
724function isBodySizeLimitError(errorMessage: string): boolean {
725 const lowerMessage = errorMessage.toLowerCase()
726 return (
727 lowerMessage.includes('body size') ||
728 lowerMessage.includes('payload too large') ||
729 lowerMessage.includes('entity too large') ||
730 lowerMessage.includes('request entity too large') ||
731 lowerMessage.includes('body_not_allowed') ||
732 lowerMessage.includes('request body larger than')
733 )
734}
735
736/**
737 * Handles body size limit errors by logging and throwing a user-friendly error

Callers 3

handleBodySizeLimitErrorFunction · 0.85
isRetryableFailureFunction · 0.85
executeMcpToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected