open-notebook/api
Luis Novo faf0f0e65d
fix(sources): reject unsupported uploads at ingestion with 415 (#975) (#1117)
Unsupported files used to enqueue a background job that failed and then
burned the full 15-attempt retry budget (~1h) before showing a generic
"Failed" with no actionable detail.

- Add a pre-flight `_assert_file_supported()` using content-core 2.x's
  header-only `check_file_support()` (same routing as real extraction) in
  the upload branch of `_build_content_state`, before any job is enqueued
  and before the source record is created.
- Guard the source-retry endpoint the same way. Unexpected check errors
  (e.g. file removed before a retry) fall through to normal extraction.
- Map `UnsupportedTypeException` to `415 Unsupported Media Type` via a
  dedicated global handler (previously fell through to the base
  OpenNotebookError handler's 500). The message names the detected type.

Part of #939.
2026-07-12 18:59:59 -03:00
..
routers fix(sources): reject unsupported uploads at ingestion with 415 (#975) (#1117) 2026-07-12 18:59:59 -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 ci: gate PRs on mypy, start ignore_errors burn-down (#1076) 2026-07-11 19:25:29 -03:00
main.py fix(sources): reject unsupported uploads at ingestion with 415 (#975) (#1117) 2026-07-12 18:59:59 -03:00
middleware.py fix: reject oversized request bodies before auth/routing (#1014) 2026-07-10 11:15:18 -03:00
models.py refactor(frontend): consume GET /api/providers instead of the manual provider table (#1108) 2026-07-12 12:46:38 -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