Visting https://mbs.fedoraproject.org/module-build-service/1/module-builds/?id=45 gives me '500 Internal Server Error '. I would expect a proper HTTP error code and message rather than 500.
https://mbs.fedoraproject.org/module-build-service/1/module-builds/?id=45
Here's the traceback:
ERROR:module_build_service:Exception on /module-build-service/1/module-builds/ [GET] Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/lib/python2.7/site-packages/flask/views.py", line 84, in view return self.dispatch_request(*args, **kwargs) File "/usr/lib/python2.7/site-packages/flask/views.py", line 149, in dispatch_request return meth(*args, **kwargs) File "/usr/lib/python2.7/site-packages/module_build_service/views.py", line 101, in get 'meta': pagination_metadata(p_query, request.args) File "/usr/lib/python2.7/site-packages/module_build_service/utils.py", line 392, in pagination_metadata _external=True, **request_args_wo_page), File "/usr/lib/python2.7/site-packages/flask/helpers.py", line 312, in url_for return appctx.app.handle_url_build_error(error, endpoint, values) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1641, in handle_url_build_error reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/flask/helpers.py", line 305, in url_for force_external=external) File "/usr/lib/python2.7/site-packages/werkzeug/routing.py", line 1620, in build raise BuildError(endpoint, values, method) BuildError: ('module_builds_list', {'per_page': 10, 'page': 1, 'id': [u'45']}, None)
@mjia, the URL is "supposed" to be https://mbs.fedoraproject.org/module-build-service/1/module-builds/45 (instead of ?id=45). We should still fix the app to not return a crazy 500 error here.
?id=45
I thought this API endpoint would support filtering the builds by id. Sohttps://mbs.fedoraproject.org/module-build-service/1/module-builds/?id=45 and https://mbs.fedoraproject.org/module-build-service/1/module-builds/45 would return the same response. I guess it does not hurt if we support both ways, right?
https://mbs.fedoraproject.org/module-build-service/1/module-builds/45
Yeah, agreed.
PR #812 fixes this
Metadata Update from @mprahl: - Issue assigned to mprahl - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.