Troubleshooting
Common issues and solutions when using chowbea-axios.
This guide covers common issues you might encounter and how to resolve them.
Common Issues
Types Seem Stale
Symptom: Your generated types don't match the current API.
Solution: Delete the cache and regenerate:
# Delete the _internal folder to reset cache
rm -rf app/services/api/_internal
# Fetch fresh spec and regenerate
chowbea-axios fetch --forceMissing operationId Warning
Symptom: You see warnings like "Skipping operation without operationId".
Solution: This means some endpoints in your OpenAPI spec don't have operationId defined. While the path-based API will still work, operation-based methods won't be generated for these endpoints.
Run the validate command to see all issues:
chowbea-axios validateAsk your API team to add operationId to all operations in the spec.
Network Errors During Fetch
Symptom: Fetch fails with network errors.
Possible causes:
- API server is not running
- Incorrect endpoint URL
- Authentication required
Solution:
- Check your API server is running:
curl http://localhost:3000/docs/swagger/json- Verify the endpoint in your config:
chowbea-axios status- If authentication is required, add HTTP Basic Auth (the supported scheme today):
[fetch.auth]
type = "basic"
username = "$SWAGGER_USER"
password = "$SWAGGER_PASS"See Authentication → Protected OpenAPI Specs for details.
The CLI retries with exponential backoff. If all retries fail and you have a cached spec, it will use that instead.
Scripts Missing from package.json
Symptom: The api:* scripts aren't in your package.json.
Solution: Re-run init to add them:
chowbea-axios initOr add them manually:
{
"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"
}
}Basic Auth Not Working
Symptom: Fetch fails with 401/403 even though [fetch.auth] is configured.
Solution: Check environment variable interpolation:
- Ensure the env vars are set:
echo $SWAGGER_USER
echo $SWAGGER_PASS- Verify your config syntax —
$VARand${VAR}both work:
[fetch.auth]
type = "basic"
username = "$SWAGGER_USER"
password = "${SWAGGER_PASS}"- Export the variables before running:
export SWAGGER_USER="..." SWAGGER_PASS="..."
chowbea-axios fetchIf the vars aren't set, the CLI prompts for them interactively in a TTY and fails fast in CI.
Dashboard Won't Open / Falls Back to Headless
Symptom: Running chowbea-axios with no command prints a hint about falling back to headless mode.
Solution: The dashboard requires Bun. Install Bun, or use the headless CLI commands (fetch, generate, etc.). The headless surface is fully supported under Node alone — Bun is only needed for the interactive TUI.
Generation Errors
Symptom: Generation fails or produces TypeScript errors in _generated/.
Solution: Validate your spec first — the built-in generator surfaces problems by category:
chowbea-axios validate --strictTypeScript Errors in Generated Files
Symptom: TypeScript compiler errors in _generated/ files.
Possible causes:
- OpenAPI spec has invalid schemas
- Circular references in spec
- Incompatible TypeScript version
Solution:
- Validate the spec:
chowbea-axios validate --strict- Regenerate with force:
chowbea-axios fetch --force- Check TypeScript version (5.x recommended)
Error Messages Reference
Config Errors
| Error | Cause | Solution |
|---|---|---|
CONFIG_ERROR | Config file missing or unreadable | Run chowbea-axios init |
CONFIG_VALIDATION_ERROR | Invalid config value | Check the specific field mentioned |
Network Errors
| Error | Cause | Solution |
|---|---|---|
NETWORK_ERROR | Cannot reach API endpoint | Check server is running, verify URL |
HTTP 401 | Authentication required | Add auth headers 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 | Run chowbea-axios fetch --force |
Generation Errors
| Error | Cause | Solution |
|---|---|---|
GENERATION_ERROR | Generator failed (invalid schema, unresolved $ref, depth limit hit) | Run chowbea-axios validate --strict and fix reported issues |
OUTPUT_ERROR | Cannot write files | Check folder permissions |
Getting Help
If you're still stuck:
- Run with verbose output:
chowbea-axios fetch --verbose- Check the status of your setup:
chowbea-axios status- Validate your OpenAPI spec:
chowbea-axios validate --strict- Open an issue on GitHub with:
- The error message
- Your
api.config.toml(remove sensitive headers) - Your OpenAPI spec (or a minimal reproduction)