fix(kiloclaw): Handle Fly 400 "no capacity" as a capacity error#787
Merged
pandemicsyn merged 1 commit intomainfrom Mar 3, 2026
Merged
fix(kiloclaw): Handle Fly 400 "no capacity" as a capacity error#787pandemicsyn merged 1 commit intomainfrom
pandemicsyn merged 1 commit intomainfrom
Conversation
Fly returns 400 with {"error":"no capacity"} on createVolume when a region
lacks capacity. This was not recognized by isFlyInsufficientResources, causing
provision to fail instead of falling back to the next region.
- Add 400 to CAPACITY_STATUS_CODES and "no capacity" to CAPACITY_MARKERS
- Include region in createVolume error context for easier debugging
- Add tests for the new 400 capacity case and non-capacity 400 rejection
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (2 files)
|
pandemicsyn
commented
Mar 3, 2026
| body: JSON.stringify(request), | ||
| }); | ||
| await assertOk(resp, 'createVolume'); | ||
| await assertOk(resp, `createVolume [${request.region}]`); |
Contributor
Author
There was a problem hiding this comment.
mostly out of morbid curiosity, but having the region handy here might be helpful later
St0rmz1
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
400with{"error":"no capacity"}oncreateVolumewhen a region lacks capacity. This was not recognized byisFlyInsufficientResources, so provision failed with an unhandled error instead of falling back to the next region.400toCAPACITY_STATUS_CODESand"no capacity"toCAPACITY_MARKERScreateVolumeerror context for easier debugging (e.g.Fly API createVolume [iad] failed (400))Capacity error codes handled (after this PR)
"no capacity"createVolume— observed in production, not sure why"insufficient resources""insufficient memory""over the allowed quota"Testing
pnpm typecheck && pnpm test && pnpm lint— all pass (491 tests).