#32 The API does not return error message in JSON
Closed: Fixed 6 years ago Opened 6 years ago by mjia.

Right now, all these exceptions are returned in HTML. For example,

http post http://0.0.0.0:5005/api/v1.0/decision decision_context="bodhi_update_push_stable" Accept:'application/json' product_version="fedora-27" subject:='["glibc-1.0-1.f26"]'

HTTP/1.0 404 NOT FOUND
Content-Length: 161
Content-Type: text/html
Date: Thu, 20 Jul 2017 05:31:39 GMT
Server: Werkzeug/0.12.2 Python/2.7.13

<title>404 Not Found</title>

Not Found

Cannot find any applicable policies for fedora-27

It would be good to return JSON to make other apps quering Greenwave life easier. We probably just need to add some errorhandlers in Flask.


Either HTML, or in the case of errors on downstream servers (see #38), plain text.

Metadata Update from @mjia:
- Issue status updated to: Closed (was: Open)

6 years ago

Metadata Update from @dcallagh:
- Issue unmarked as blocking: #37
- Issue assigned to mjia
- Issue close_status updated to: Fixed
- Issue set to the milestone: 0.1

6 years ago

Login to comment on this ticket.

Metadata