Skip to content

fix: improve error handling and clean up scan timers - #8

Open
devin-ai-integration[bot] wants to merge 2 commits into
masterfrom
devin/1781349752-improve-error-handling
Open

fix: improve error handling and clean up scan timers#8
devin-ai-integration[bot] wants to merge 2 commits into
masterfrom
devin/1781349752-improve-error-handling

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Strengthens failure handling across the frontend and scan service without changing successful request behavior.

  • Treat scan-service JSON as unknown, require numeric score/totalViolations, normalize violations, and return 502 for malformed payloads.
  • Surface browser fetch and revenue-calculation failures to users, while retaining best-effort persistence.
  • Replace Supabase environment non-null assertions with explicit configuration errors.
  • Clear the scan timeout after completion and log failures from report-status updates, alert delivery, screenshots, and LLM fallback attempts.

The branch was reconciled with the shared-package refactor in master; duplicate SSRF and obsolete CMS-detector edits were intentionally removed.

Link to Devin session: https://app.devin.ai/sessions/d0785b2f058f4d33b4a75eff3284f47a
Requested by: @vedantggwp

- mcp-server: guardRequest now fails closed (abort) instead of open (continue)
- scan-service: check DB update error when marking reports as failed
- scan-service: log LLM translation failures instead of silently swallowing
- scan-service: log notify.ts alert delivery failures
- scan-service: clear timeout timer on scan success to prevent resource leak
- scan-service: log screenshot and CMS detection errors
- app: validate Supabase env vars with clear error messages
- app: handle network errors in scan results page fetchScan
- app: surface revenue calculation errors to user
- app: guard against invalid JSON from scan service response

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title fix: improve error handling — stop swallowing errors, fix fail-open SSRF guard, plug resource leak fix: improve error handling and clean up scan timers Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant