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
Fix:
- 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.
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 |
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."