Troubleshooting
Common issues and solutions when using chowbea-axios.
Something broke. Probably not the generator's fault — but let's find out before you @channel the backend team.
Common Issues
Types Seem Stale
Symptom: Generated types don't match what the API actually returns. Your IDE lies with confidence.
Fix: Nuke the cache and fetch fresh:
# Delete _internal to reset the spec cache
rm -rf app/services/api/_internal
# Fetch fresh spec and regenerate
chowbea-axios fetch --forceIf types look right but app code still references old shapes, check you're importing from api.contracts.ts, not a hand-rolled alias from three sprints ago. See The Query Layer.
Missing operationId Warning
Symptom: "Skipping operation without operationId" during generation.
Meaning: Some endpoints lack operationId in the spec. Path-based api.get("/users") still works. api.op.listUsers won't exist for those endpoints — because there's nothing to name the method after.
chowbea-axios validateShows every offender. Ask your API team to add operationId to all operations. This is a spec hygiene issue, not a generator bug.
Network Errors During Fetch
Symptom: Fetch dies with network errors.
Likely causes:
- API server isn't running
- Wrong endpoint URL
- Auth required and not configured
Fix:
- Confirm the server is up:
curl http://localhost:3000/docs/swagger/json- Verify config:
chowbea-axios status- If the spec is behind auth, add HTTP Basic (supported scheme today):
[fetch.auth]
type = "basic"
username = "$SWAGGER_USER"
password = "$SWAGGER_PASS"See Authentication → Protected OpenAPI Specs.
The CLI retries with exponential backoff. If all retries fail and a cached spec exists, it falls back to that. Stale types beat no types — but know which you're getting.
Scripts Missing from package.json
Symptom: No api:* scripts in package.json.
Fix: Re-run init:
chowbea-axios initOr add them manually — same commands, less hand-holding:
{
"scripts": {
"api:fetch": "chowbea-axios fetch",
"api:generate": "chowbea-axios generate",
"api:watch": "chowbea-axios watch",
"api:status": "chowbea-axios status",
"api:validate": "chowbea-axios validate",
"api:diff": "chowbea-axios diff"
}
}Pair api:watch with your dev server. Your future self will thank you.
Basic Auth Not Working
Symptom: 401/403 despite [fetch.auth] being configured.
Fix: Env var interpolation is almost always the culprit.
- Confirm vars are set:
echo $SWAGGER_USER
echo $SWAGGER_PASS- Config syntax —
$VARand${VAR}both work:
[fetch.auth]
type = "basic"
username = "$SWAGGER_USER"
password = "${SWAGGER_PASS}"- Export before running:
export SWAGGER_USER="..." SWAGGER_PASS="..."
chowbea-axios fetchUnset vars in a TTY? CLI prompts interactively. In CI? Fails fast. As it should.
Dashboard Won't Open / Falls Back to Headless
Symptom: chowbea-axios with no command prints a headless fallback hint.
Meaning: The interactive dashboard needs Bun. Install Bun, or use headless commands — fetch, generate, watch, etc. Headless works fine under Node alone. Bun is only for the TUI.
See Interactive Dashboard for invocation details.
Generation Errors
Symptom: Generation fails or _generated/ produces TypeScript errors.
Fix: Validate first — the generator surfaces problems by category:
chowbea-axios validate --strictFix what validate reports. Regenerate. Repeat until boring.
TypeScript Errors in Generated Files
Symptom: TSC errors pointing at _generated/.
Likely causes:
- Invalid schemas in the OpenAPI spec
- Circular references the generator can't flatten
- TypeScript version mismatch
- Merge conflicts left unresolved
Fix:
- Check for conflicts first:
git status
# If you see unmerged paths in _generated/:
chowbea-axios resolve- Validate:
chowbea-axios validate --strict- Force regeneration:
chowbea-axios fetch --force- TypeScript 5.x recommended. If you're on 4.x, upgrade before filing an issue.
Remember: don't edit _generated/ to "fix" errors. Fix the spec. See Generated Files.
Merge Conflicts in Generated Files
Symptom: Git shows conflict markers in _generated/api.operations.ts, _generated/api.types.ts, or other generated files after a merge.
Why it happens: Generated files are thousands of lines long and change frequently. Text-based merging produces unreadable conflicts.
Fix:
# After a merge with conflicts in _generated/
chowbea-axios resolveThe resolve command regenerates the conflicted files from the spec — the only correct resolution for generated code. It stages the result automatically.
See resolve reference for details.
Merge Conflicts in Cache Files (_internal/)
Symptom: Conflicts appear in _internal/.api-cache.json or _internal/openapi.json after a merge.
Why it happens: The cache was accidentally committed. It changes on every fetch (timestamp, hash) and causes meaningless conflicts.
Fix:
# Untrack the cache and add the gitignore rule
chowbea-axios doctor --fix
# Commit the repair
git commit -m "chore: stop tracking _internal cache"The doctor command detects tracked artifacts and untracks them while keeping the files on disk. Future merges won't touch the cache.
See doctor reference for details.
Error Messages Reference
Config Errors
| Error | Cause | Solution |
|---|---|---|
CONFIG_ERROR | Config missing or unreadable | Run chowbea-axios init |
CONFIG_VALIDATION_ERROR | Invalid config value | Check the field mentioned in the error |
Network Errors
| Error | Cause | Solution |
|---|---|---|
NETWORK_ERROR | Can't reach API endpoint | Server running? URL correct? |
HTTP 401 | Auth required | Add [fetch.auth] to config |
HTTP 404 | Endpoint not found | Verify api_endpoint URL |
HTTP 5xx | Server error | Check API server logs |
Spec Errors
| Error | Cause | Solution |
|---|---|---|
SPEC_NOT_FOUND | No cached spec | Run chowbea-axios fetch first |
SPEC_PARSE_ERROR | Invalid JSON/YAML | chowbea-axios fetch --force |
Generation Errors
| Error | Cause | Solution |
|---|---|---|
GENERATION_ERROR | Invalid schema, unresolved $ref, depth limit | chowbea-axios validate --strict, fix reported issues |
OUTPUT_ERROR | Can't write files | Check folder permissions |
Pinned-Inputs Errors (v3)
| Error | Cause | Solution |
|---|---|---|
pinned bus manifest not found … run chowbea-axios sync | Pinned mode is on but the pin doesn't exist yet | Run sync — fetch can't create pins, by design |
generatedAt must be a string | A v2 CLI met a v3 (date-free) manifest | Upgrade that consumer to chowbea-axios@^3 — see migration |
hash does not match barrels content | The pinned manifest was hand-edited or corrupted | Restore it from git, or re-run sync — never hand-edit pins |
Refusing to send Basic Auth credentials over cleartext HTTP | [fetch.auth] + an http:// endpoint on a non-loopback host | Use https:// (localhost stays allowed) |
sync requires the live endpoint — refusing to pin from the cache fallback | The stable endpoint was unreachable during sync | Fix connectivity and re-run; your current pins remain the last known good |
| Sync PR opens with no CI checks | create-pull-request is on the default GITHUB_TOKEN | Set the CHOWBEA_PR_TOKEN token: input |
Getting Help
Still stuck after the obvious fixes:
- Verbose output:
chowbea-axios fetch --verbose- Setup status:
chowbea-axios status- Spec validation:
chowbea-axios validate --strict- Open an issue with:
- The error message (full, not paraphrased)
- Your
api.config.toml(redact secrets) - Your OpenAPI spec or a minimal reproduction
The fastest issues to close include reproduction steps. The slowest include "it doesn't work."