You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(http): extract timeout parsing into shared helper function
Extract duplicated timeout parsing logic from handleInternalRequest and
handleProxyRequest into a shared parseTimeout() helper function:
- Define DEFAULT_TIMEOUT_MS and MAX_TIMEOUT_MS as module-level constants
- Add parseTimeout() function with proper TSDoc documentation
- Replace inline timeout parsing in both functions
This addresses the code duplication noted in the Greptile review.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
'Request body size limit exceeded (10MB). The workflow data is too large to process. Try reducing the size of variables, inputs, or data being passed between blocks.'
51
51
52
+
/** Default timeout for HTTP requests in milliseconds (2 minutes) */
53
+
constDEFAULT_TIMEOUT_MS=120000
54
+
55
+
/** Maximum allowed timeout for HTTP requests in milliseconds (10 minutes) */
56
+
constMAX_TIMEOUT_MS=600000
57
+
58
+
/**
59
+
* Parses and validates a timeout value from params
60
+
* @param timeout - The timeout value (number or string) from params
61
+
* @returns The validated timeout in milliseconds, capped at MAX_TIMEOUT_MS
0 commit comments