You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`limitless export-csv --date 2025-11-01 --output /tmp/lifelogs.csv` — dump metadata (add `--include-markdown` to include body content).
96
96
97
+
## Error handling & exit codes
98
+
99
+
- Network failures (including timeouts) are retried when safe and surface as concise `ApiError` messages (`HTTP 429` with Retry-After hints, or `Request timed out …`).
100
+
- Local persistence issues (e.g., unwritable data dir) become `StorageError`/`StateError` with the offending path in the context.
101
+
- The CLI wraps those exceptions in friendly stderr output so you see a single `Error: …` line instead of a Python traceback; pass `-v/--verbose` to capture the stack trace in logs if needed.
102
+
- Exit codes: `0` success, `1` operational/service errors, `2` validation/config problems (e.g., invalid timezone, missing `--date` when using `--combine`), `130` for `Ctrl+C` aborts.
103
+
- Errors also drive JSON logging via `--verbose`, so CI logs include structured context without leaking secrets.
Regex searches accept `--regex` or the short form `-rg` and are case-insensitive; fuzzy search uses `rapidfuzz` when available (falls back to `difflib`) with `--fuzzy-threshold` defaulting to `80`.
117
117
118
+
### Error handling & exit codes
119
+
120
+
- The HTTP client retries `429/502/503/504` responses (respecting `Retry-After`) and wraps network failures/timeouts in `ApiError` so the CLI can surface a concise message such as `Error: Request timed out while fetching lifelogs.`
121
+
- Storage/state operations raise `StorageError`/`StateError` with the problematic path in their context; services rewrap them as `ServiceError` for consistent CLI UX.
122
+
- Exit codes: `0` success, `1` operational/service errors (HTTP/network/storage), `2` validation/config issues (e.g., invalid timezone, missing `--date` when using `--combine`), `130` when the user interrupts with `Ctrl+C`.
123
+
- The CLI prints only a single `Error: …` line to stderr; pass `-v/--verbose` (or set `LIMITLESS_DEBUG=1`) to include full stack traces in the structured logs while keeping stdout clean for JSON piping.
124
+
118
125
### Configuration file (MVP)
119
126
120
127
You can store defaults in a user config TOML and select profiles via `--profile`:
0 commit comments