-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Is your feature request related to a problem?
When using the evaluations API with an invalid limit value (e.g., -1), it returns a raw PostgreSQL database error instead of a structured validation error. This exposes internal SQL details and disrupts standard API error handling.
Describe the solution you'd like
- Return a structured validation error instead of a raw SQL error for invalid limit values.
- Ensure error response format matches the expected behavior outlined above.
Original issue
Describe the bug
When calling the evaluations API with an invalid limit value (e.g., -1), the API returns a raw database error from PostgreSQL instead of a structured validation error.
This exposes internal SQL details and breaks expected API error handling standards.
To Reproduce
Steps to reproduce the behavior:
Send a GET request to:
/api/v1/evaluations?limit=-1&offset=0
Observe the response
Expected behavior
{
"success": false,
"data": null,
"error": "Validation failed",
"errors": [
{
"field": "query.limit",
"message": "Input should be greater than 0"
}
],
"metadata": null
}
Screenshots
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status