Description of problem: when trying to get {engine_url}/ovirt-engine/api/events;max=-3 the error message returned is the postgresql message: <fault><detail>statementcallback; sql [select * from ((select distinct audit log.* from audit log where not deleted) order by audit log id desc ) as t1 offset (1 -1) limit -2]; error: limit must not be negative; nested exception is org.postgresql.util.psqlexception: error: limit must not be negative</detail><reason>Operation Failed</reason></fault> This should be replaced by application level error message Version-Release number of selected component (if applicable): rhevm-4.0.2-0.2.rc1.el7ev.noarch How reproducible: always Steps to Reproduce: 1.GET {engine_url}/ovirt-engine/api/events;max=-3 additional info: looks like all max functionality with other entities returns non decriptive error messages. i checked ovirt-engine/api/tags;max=-2 and it returned <fault><detail>fromIndex(0) > toIndex(-2)</detail><reason>Operation Failed</reason></fault>
I don't see what's the point of fixing such issues. What is the consequence of sending a negative number?
(In reply to Yaniv Kaul from comment #1) > I don't see what's the point of fixing such issues. What is the consequence > of sending a negative number? Sending a negative number is one issue and I agree that this is minor, but the bug is that the message of the exception thrown is not exposed to the API and it can occur in other scenarios as well since the exception is actually swallowed and just writes to the log so the respond returned to the API had a general failure with an unknown reason ...
Moving back to POST as we need to backport the patch to ovirt-engine-4.0 branch
Retargeting to 4.0.2 as patch is already merged to ovirt-engine-4.0 branch
This bug was fixed and is slated to be in the upcoming version. As we are focusing our testing at this phase on severe bugs, this bug was closed without going through its verification step. If you think this bug should be verified by QE, please set its severity to high and move it back to ON_QA