mchades opened a new issue, #14633:
URL: https://github.com/apache/gravitino/issues/14633
### Version
main branch, commit `6550ca246035d3dd19e80aaed5a673121f073f85`.
### Describe what's wrong
The metadata REST API returns HTTP 404 for malformed typed query parameters.
For example, non-numeric or out-of-range `outputMaxLines` / `outputMaxBytes`
values on the job GET endpoint fail during Jersey binding, before
`JobOperations.getJob` runs.
These are invalid request parameters and should return HTTP 400 with the
existing illegal-arguments JSON response, consistent with semantic validation
such as a zero output limit.
### Error message and/or stacktrace
```text
GET
/api/metalakes/test/jobs/runs/{jobId}?includeOutput=true&outputMaxLines=abc
HTTP 404
QueryParamException: Invalid value for QueryParam parameter 'outputMaxLines'
```
`2147483648` and `-2147483649` produce the same status for either output
limit.
### How to reproduce
1. Use an authenticated caller with access to an existing job.
2. Send a job GET request with `includeOutput=true` and
`outputMaxLines=abc`, or set either output limit outside the Java integer range.
3. Observe HTTP 404 instead of HTTP 400.
Reproduced in Jersey HTTP tests using the actual `JobOperations` resource
and the production `ParamExceptionMapper`; all six malformed/overflow cases
return 404 before the fix.
### Additional context
`ParamExceptionMapper` preserves Jersey's default 404 for
`QueryParamException`. #12783 / #12784 added structured JSON errors while
retaining those statuses. This is a separate request to classify malformed
query values as bad requests, retaining path/matrix parameter and
resource-not-found behavior.
Related but separate services: #14432 (Iceberg REST) and #14425 (Lance REST).
--
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]