Skip to content

🐛 Add fetch timeouts and sanitize error messages in Netlify functions#13023

Merged
kubestellar-hive[bot] merged 1 commit into
mainfrom
fix/netlify-timeouts-errors
May 11, 2026
Merged

🐛 Add fetch timeouts and sanitize error messages in Netlify functions#13023
kubestellar-hive[bot] merged 1 commit into
mainfrom
fix/netlify-timeouts-errors

Conversation

@kubestellar-hive
Copy link
Copy Markdown
Contributor

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)

Function Fetch calls fixed
affiliate-clicks 2
analytics-collect 1
analytics-dashboard 2
github-pipelines 1
gtag-proxy 1
medium-blog 1
nightly-e2e 4
umami-collect 1
umami-script 1
youtube-playlist 1

Error sanitization (feedback-app.mts)

  • Client auth invalid: ${msg} → generic 'Client authentication failed'
  • Repo capability check failed: ${msg} → generic message
  • App credential unavailable: ${msg} → 'Service temporarily unavailable'
  • 3 GitHub API error responses → generic messages
  • All raw details now logged server-side via console.error()
- 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>
@kubestellar-hive kubestellar-hive Bot requested review from Copilot and removed request for Copilot May 11, 2026 04:04
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label May 11, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign eeshaansa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 4aad04d
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a015545734f350008d0cbec
😎 Deploy Preview https://deploy-preview-13023.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added ai-generated Pull request generated by AI tier/2-standard labels May 11, 2026
@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-hive kubestellar-hive Bot merged commit 1e58179 into main May 11, 2026
28 of 29 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the fix/netlify-timeouts-errors branch May 11, 2026 04:12
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions
Copy link
Copy Markdown
Contributor

❌ Post-Merge Verification: failed

Commit: 1e581799219043798f28413ff0ed5a5f8207f8c0
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/25649887410

@github-actions
Copy link
Copy Markdown
Contributor

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit 1e581799219043798f28413ff0ed5a5f8207f8c0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull request generated by AI copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tier/2-standard

0 participants