When using the API to query for module builds, if there are no matching results, and short=true is used, 500 error is returned:
short=true
$ curl -Lk 'https://mbs.fedoraproject.org/module-build-service/1/module-builds/?name=httpd&stream=8000020190404151421&short=true' <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
Removing short=true returns the correct JSON response:
$ curl -Lk 'https://mbs.fedoraproject.org/module-build-service/1/module-builds/?name=httpd&stream=8000020190404151421' { "items": [], "meta": { "first": "http://mbs.fedoraproject.org/module-build-service/1/module-builds/?per_page=10&page=1&name=httpd&stream=8000020190404151421", "last": "http://mbs.fedoraproject.org/module-build-service/1/module-builds/?per_page=10&page=0&name=httpd&stream=8000020190404151421", "next": null, "page": 1, "pages": 0, "per_page": 10, "prev": null, "total": 0 } }
Metadata Update from @cqi: - Issue assigned to cqi
Commit 6f1d0b3 fixes this issue
Login to comment on this ticket.