-
Notifications
You must be signed in to change notification settings - Fork 105
Description
What happened?
Is your feature request related to a problem? Please describe.
- GET /tasks?status=working (or input-required, etc.) causes an IllegalArgumentException because the REST handler uses TaskState.valueOf(status). That method only accepts enum names like WORKING, so valid wire strings
fail and end up as a 500 InternalError.
Describe the solution you'd like
- Parse the status using TaskState.fromString(status) and, on invalid values, return InvalidParamsError (HTTP 422).
Describe alternatives you've considered
- None.
Additional context
- The REST API expects wire strings (working, input-required, etc.) but the handler currently expects enum names. This is why valid requests fail.
- RestHandler.mapErrorToHttpStatus already maps InvalidParamsError to 422, so returning 500 here looks unintended.
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels