shivaam opened a new issue, #75532:
URL: https://github.com/apache/airflow/issues/75532
### Under which category would you file this issue?
Airflow Core (UI)
### Apache Airflow version
main (`57a4751c967`)
### What happened and how to reproduce it?
- On a Human-in-the-loop request with several options and `multiple=True`,
the Respond button is
enabled with nothing selected.
- Submitting sends an empty `chosen_options`, which the API rejects with 422
(`min_length=1`).
- The form shows only "Response failed / Validation Error". The request
correctly stays pending, and
a later valid answer completes it.
Reproduce:
1. Run `HITLOperator(subject="Pick colours", options=["red", "green",
"blue"], multiple=True)`.
2. Open Required Actions, select nothing, and click Respond.
### What you think should happen instead?
- **Main ask:** the form doesn't let an empty answer through. Respond stays
disabled until at least
one option is chosen, with a short inline hint such as "Select at least
one option". No error is
ever shown for this case, and the fix stays inside
`airflow-core/src/airflow/ui/src/pages/HITLTaskInstances/HITLResponseForm.tsx`.
### Anything else?
- **Why the message is generic:**
- `createErrorToaster` (`ui/src/utils/errorHandling.ts`) shows
`error.message`.
- For the generated API client, that is the OpenAPI description of the 422
response, which
FastAPI always calls "Validation Error".
- The actual reason, in the response body, is never shown. Here it is
"List should have at
least 1 item after validation, not 0".
- **Broader follow-up:** surface the response body's reason in error toasts,
so other 422s on this
form say what was wrong. This can be separate from the fix above.
- The main ask is small and self-contained, which makes it a reasonable
first issue for someone new
to the UI code.
---
Drafted-by: Claude Code (Opus 5.5) (no human review before posting)
--
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]