🐛 Add fetch timeouts and sanitize error messages in Netlify functions#13023
Conversation
- Add AbortSignal.timeout() to 14 fetch calls across 10 Netlify functions that had no timeout, preventing indefinite hangs on upstream failures - Sanitize 6 error responses in feedback-app.mts that leaked raw GitHub API error messages to clients — now logs details server-side and returns generic messages Files: affiliate-clicks, analytics-collect, analytics-dashboard, github-pipelines, gtag-proxy, medium-blog, nightly-e2e, umami-collect, umami-script, youtube-playlist, feedback-app Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Copilot <copilot@github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
❌ Post-Merge Verification: failedCommit: |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
Security hardening: 14 fetch() calls across 10 Netlify functions had no timeout mechanism — a slow/hung upstream would keep the function running until Netlify's 26s hard limit, wasting resources. Also sanitizes 6 error responses in feedback-app.mts that leaked raw GitHub API error text to clients.
Fetch timeouts added (AbortSignal.timeout)
Error sanitization (feedback-app.mts)
Client auth invalid: ${msg}→ generic 'Client authentication failed'Repo capability check failed: ${msg}→ generic messageApp credential unavailable: ${msg}→ 'Service temporarily unavailable'console.error()