troubleshootinglisted
Install: claude install-skill AndriyKalashnykov/flight-path
# Troubleshooting
## Port 8080 in Use
```bash
lsof -ti:8080 | xargs kill -9
# or
pkill -f "flight-path/server"
```
## API Returns 404
- Health check is `GET /` (not `/health`)
- Calculate is `POST /calculate` (not GET)
- Check Swagger: http://localhost:8080/swagger/index.html
## API Returns 500
- Check server terminal for error logs
- Test with minimal input: `curl -X POST http://localhost:8080/calculate -H 'Content-Type: application/json' -d '[["SFO", "EWR"]]'`
- Verify input format: `[][]string` — each segment must be exactly 2 airport codes
## Swagger Docs Stale
```bash
make api-docs # Regenerate from annotations
pkill -f server # Restart server
make run
```
- If generation fails, check Swagger annotation syntax against existing handlers in `internal/handlers/`
- Hard-refresh browser (Ctrl+Shift+R) to clear cached Swagger UI
## Build Fails
```bash
go version # Must match the `go` directive in go.mod
go mod tidy && make build # Clean up and retry
go clean -cache # Nuclear option
```
- `make build` depends on `api-docs` (which depends on `deps`), then compiles
- Ensure `GOFLAGS=-mod=mod` is set (Makefile sets this automatically)
- Use `make check` (alias for `make ci`) for the full local pipeline: static-check + test + integration-test + coverage + coverage-check + build + fuzz + deps-prune-check
## `static-check` / `govulncheck` Fails on an Unrelated PR (Go stdlib CVE)
**Symptom:** An open PR that touches no Go code — e.g. a Renova