Poor feedback of invalid target_distribution field in sbuild workflow requiring vendor:codename format
When scheduling a workflow with an sbuild-based template and the given target_distribution has an invalid format (such as a bare codename), the user feedback is suboptimal. The API response indicates that the workflow has been created successfully. Viewing the work request shows an error without telling what went wrong. The error.log (visible to administrators only) shows:
ERROR: Cannot create a workflow
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/debusine/db/models/work_requests.py", line 205, in create_workflow
orchestrator.validate_input()
File "/usr/lib/python3/dist-packages/debusine/server/workflows/sbuild.py", line 168, in validate_input
raise WorkflowValidationError(
debusine.server.workflows.base.WorkflowValidationError: target_distribution must be in vendor:codename format
It would be good if this feedback would be more easily accessible to the end user either by rejecting the creation of the workflow or adding an error message to the failed task.