open-notebook/api
Luis Novo 16c9c9d535
fix(sources): cap error text surfaced to clients (#1140)
* fix(sources): cap error text surfaced to clients

Source processing status (get_source_status) and sync-processing failures
returned the raw command/result error_message to clients unbounded, which
could leak arbitrary internal exception text and didn't match the error
capping applied elsewhere in the API.

Add a None-safe _truncate_error helper (200-char cap, ellipsis when cut)
and apply it on both paths. Adds focused unit tests for the helper.

Closes #1136

* test: narrow Optional return before assertions to satisfy mypy
2026-07-14 12:22:19 -03:00
..
routers fix(sources): cap error text surfaced to clients (#1140) 2026-07-14 12:22:19 -03:00
__init__.py Api podcast migration (#93) 2025-07-17 08:36:11 -03:00
AGENTS.md docs: restructure documentation around AGENTS.md, VISION.md and decision records (#1032) 2026-07-10 15:33:19 -03:00
auth.py chore: remove dead auth helper and fix stale default-password docs (#1026) 2026-07-10 15:47:40 -03:00
CLAUDE.md docs: restructure documentation around AGENTS.md, VISION.md and decision records (#1032) 2026-07-10 15:33:19 -03:00
command_service.py refactor(api): remove dead Streamlit-era service layer and demo commands (#1054) 2026-07-11 18:17:44 -03:00
credentials_service.py fix: pin DNS for outbound provider HTTP requests (#1063) 2026-07-14 08:45:29 -03:00
main.py feat(sources): opt-in Docling + Crawl4AI runtimes installed at startup (#1122) (#1123) 2026-07-13 08:26:20 -03:00
middleware.py fix: reject oversized request bodies before auth/routing (#1014) 2026-07-10 11:15:18 -03:00
models.py feat(sources): opt-in Docling + Crawl4AI runtimes installed at startup (#1122) (#1123) 2026-07-13 08:26:20 -03:00
podcast_service.py fix(podcasts): reference speaker profiles by record ID instead of name (#1110) 2026-07-12 13:05:04 -03:00