You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🐛 Don't fail CI when Vizzly API returns 5xx errors (#190)
## Summary
- Add HTTP status code to API error context so commands can check it
- Gracefully handle 5xx errors (500, 502, 503, 530 Cloudflare tunnel,
etc.) in all CI-facing commands
- Warn user but exit 0 so their CI doesn't fail due to Vizzly
infrastructure issues
- 4xx client errors still fail as expected
## Motivation
Users were seeing their CI fail with errors like:
```
Test run failed:
API request failed: 530 - <!doctype html>...Cloudflare Tunnel error...
```
This is outside the user's control - their tests ran fine, only the
visual comparison couldn't happen because Vizzly's API was temporarily
unavailable.
## Changes
- `src/api/client.js` - Add `status` to error context
- `src/commands/run.js` - Handle 5xx gracefully
- `src/commands/upload.js` - Handle 5xx gracefully
- `src/commands/status.js` - Handle 5xx gracefully + add DI for
testability
- `src/commands/finalize.js` - Handle 5xx gracefully
- New/updated tests for all affected commands
## Test plan
- [x] `npm test` passes (1817 tests)
- [x] `npm run lint` passes
- [ ] Manual test with simulated 5xx error
0 commit comments