Skip to content

refactor: rework preflight logic to be axios middleware #31589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

cacieprins
Copy link
Contributor

  • Closes

Additional details

Steps to test

How has the user experience changed?

PR Tasks

- Move preflight logic from api/index.ts to dedicated middleware class
- Replace request-promise with axios interceptors
- Implement two-phase retry strategy:
  - Initial attempt with api-proxy
  - Retry with asyncRetry for fallback
- Store preflight state in axios instance defaults
- Add proper type checking for preflight state
- Update tests to verify middleware behavior
- Remove module-level state in favor of instance state
@cacieprins cacieprins marked this pull request as ready for review April 25, 2025 14:48
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