dograh/api
Abhishek d2cda85b78
fix: validate workflow status filter to prevent 500 on invalid enum value (#450)
* Validate workflow status filter to prevent 500 on invalid enum value

The /workflow/fetch and /workflow/summary endpoints accepted a free-form
status query param and passed it straight into a query that casts to the
workflow_status PG enum (active/archived). Any other value — e.g. an
external caller passing 'published' (a workflow_definitions version state,
not a workflow status) — failed deep in Postgres as
InvalidTextRepresentationError, surfacing as an unhandled HTTP 500.

Add _validate_status_filter() to reject values outside WorkflowStatus with
a clean 422 before any DB query, for both the single and comma-separated
paths. Add route tests covering invalid, valid-single, comma-separated, and
mixed valid/invalid cases.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: add tests

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 08:39:59 +05:30
..
alembic feat: UI refresh and user onboarding (#430) 2026-06-17 19:49:33 +05:30
assets feat: telephony call transfer (#155) 2026-02-16 14:33:33 +05:30
db feat: UI refresh and user onboarding (#430) 2026-06-17 19:49:33 +05:30
errors Feat/inbound telephony (#113) 2026-01-12 10:10:30 +05:30
mcp_server feat: create tools using MCP 2026-05-31 16:50:44 +05:30
native/rnnoise Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
routes fix: validate workflow status filter to prevent 500 on invalid enum value (#450) 2026-06-18 08:39:59 +05:30
schemas feat: UI refresh and user onboarding (#430) 2026-06-17 19:49:33 +05:30
services fix: validate workflow status filter to prevent 500 on invalid enum value (#450) 2026-06-18 08:39:59 +05:30
tasks feat: persist split user and bot audio 2026-06-16 15:19:49 +05:30
tests fix: validate workflow status filter to prevent 500 on invalid enum value (#450) 2026-06-18 08:39:59 +05:30
utils feat: persist split user and bot audio 2026-06-16 15:19:49 +05:30
.cursorignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
.dockerignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
.env.example fix: number pool initialization in multi telephony setup 2026-05-08 14:48:53 +05:30
.env.test.example feat: add devcontainer based setup (#352) 2026-05-25 20:44:22 +05:30
.gitignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
__init__.py Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
AGENTS.md feat: add chat based testing for voice agent (#308) 2026-05-21 15:20:02 +05:30
alembic.ini chore: bump pipecat version and fix tests (#263) 2026-05-04 21:35:37 +05:30
app.py fix: add CORS preflight handler and ACAO header for embed config endpoint (#403) 2026-06-03 21:27:44 +05:30
CLAUDE.md Chore/add setup and contributing docs (#90) 2025-12-27 09:25:20 +05:30
conftest.py feat: add devcontainer based setup (#352) 2026-05-25 20:44:22 +05:30
constants.py fix: harden CORS origin allow list 2026-05-27 15:36:48 +05:30
Dockerfile fix: retry for ffmpeg during github action 2026-05-31 16:05:24 +05:30
enums.py feat: UI refresh and user onboarding (#430) 2026-06-17 19:49:33 +05:30
logging_config.py feat: add headless mode, redesign floating widget, refactor lifecycle callbacks (#268) 2026-05-07 12:23:41 +05:30
pyproject.toml chore(main): release dograh 1.35.0 (#417) 2026-06-12 22:07:31 +05:30
pytest.ini feat: refactor node spec and add mcp tools (#244) 2026-04-21 07:56:16 +05:30
requirements.dev.txt feat: add devcontainer based setup (#352) 2026-05-25 20:44:22 +05:30
requirements.txt chore: upgrade posthog versions 2026-06-17 19:05:26 +05:30
sdk_expose.py feat: refactor node spec and add mcp tools (#244) 2026-04-21 07:56:16 +05:30