Bug 1489885

Summary: internal server error when limit is 0 and offset is specified for paging
Product: Red Hat CloudForms Management Engine Reporter: Martin Kourim <mkourim>
Component: APIAssignee: Jillian Tullo <jtullo>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Kourim <mkourim>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.9.0CC: jhardy, jtullo, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: api:rest
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-06 14:41:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Kourim 2017-09-08 14:50:51 UTC
Description of problem:

GET /api/features?limit=0&offset=10
results in
{
    "error": {
        "kind": "internal_server_error",
        "message": "Infinity",
        "klass": "FloatDomainError"
    }
}

There should be better input value checking.
Should fail with e.g. bad_request.

Version:
build from 20170828

Comment 2 Jillian Tullo 2017-09-29 12:35:28 UTC
PR: https://github.com/ManageIQ/manageiq-api/pull/90

Comment 3 Martin Kourim 2017-10-18 16:29:37 UTC
Verified that the request now fails with "bad_request".