github-actions[bot] opened a new pull request, #72900: URL: https://github.com/apache/airflow/pull/72900
* Return 404 instead of 500 when ti_run cannot find the DagRun A missing DagRun in the Execution API ti_run route raised a bare ValueError, which escaped the route's DataError/SQLAlchemyError guards and surfaced through the app-level catch-all as an opaque 500. A missing resource should be reported to the caller as a 404, consistent with the other not-found paths in this route. * Update airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py Co-authored-by: Henry Chen <[email protected]> * Align test with the updated missing-DagRun error message * Keep the ti_run 404 test's scalars mock out of fixture setup Patching Session.scalars as a decorator also mocked it while create_task_instance built the fixture, so the DAG bulk-write only worked because the tables were cleared first. Scope the patch to the request itself, matching the sibling database-error test. --------- (cherry picked from commit a9f6c898f01dc1e5e1dc18172f5bc65097957a71) Co-authored-by: Pierre Jeambrun <[email protected]> Co-authored-by: Henry Chen <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
