Skip to content

Conversation

@eriknson
Copy link
Owner

@eriknson eriknson commented Jan 5, 2026

Implement a mock API and harden the client-side API interactions and UI to handle failures gracefully.

This PR introduces a comprehensive mock API for testing various failure scenarios (rate limits, network errors, auth failures, malformed responses, slow responses). It then hardens the client by adding:

  • Resilient API calls: cursorClient.ts now includes retries with exponential backoff for transient errors, timeouts, and robust error typing.
  • Improved UI feedback: Replaces generic alerts with inline banners and toast messages for errors, loading states, and mock mode notifications.
  • SDK stream resilience: cursorSdk.ts and sdk-agent/route.ts now handle stream timeouts and idle disconnects gracefully.
  • Safe storage: storage.ts guards against localStorage corruption and unavailability.
  • UI flow improvements: Debounces rapid form submissions and ensures polling mechanisms don't get stuck.

Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Jan 5, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Jan 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
cursor-web Error Error Jan 5, 2026 1:23am

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.

3 participants