401 and 404 errors from the heat API are not returned with JSON content type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Invalid
|
Low
|
Unassigned | ||
keystonemiddleware |
Fix Released
|
Low
|
Colleen Murphy |
Bug Description
While 400 errors are returned with a JSON response, 401 and 404 errors are inconsistently returned with either text/plain or text/html.
Examples (using httpie client from the command line):
$ http GET http://
HTTP/1.1 401 Unauthorized
Content-Length: 23
Content-Type: text/plain
Date: Tue, 09 Sep 2014 01:27:03 GMT
Www-Authenticate: Keystone uri='http://
X-Openstack-
Authentication required
$ http GET http://
HTTP/1.1 404 Not Found
Content-Length: 154
Content-Type: text/html; charset=UTF-8
Date: Tue, 09 Sep 2014 01:19:25 GMT
X-Openstack-
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>404 Not Found</h1>
The resource could not be found.<br /><br />
</body>
</html>
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in heat: | |
assignee: | nobody → Miguel Grinberg (miguelgrinberg) |
Changed in keystonemiddleware: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: | added: user-experience |
Changed in keystonemiddleware: | |
assignee: | nobody → jiaxi (tjxiter) |
Changed in keystonemiddleware: | |
assignee: | jiaxi (tjxiter) → nobody |
Changed in heat: | |
status: | Invalid → Confirmed |
The 401 errors returned by heat API come from the keystonemiddleware package. Since this is a project used by many clients it may be wise to implement content negotiation and offer responses in several content-types to satisfy all clients.