Zun

KeyError when error_body = body_json['errors'][0]

Bug #1810908 reported by feng.shengqin@zte.com.cn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Committed
Medium
feng.shengqin@zte.com.cn

Bug Description

RESP BODY: {"message": "The server is currently unavailable. Please try again at a later time.<br /><br />\n\n\n", "code": "503 Service Unavailable", "title": "Service Unavailable"}

DEBUG (session:729) GET call to container for https://172.0.200.100:9517/containers used request id req-1be0f28c-b27c-450f-ac24-930c08ba290c
DEBUG (shell:719) 'errors'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/zunclient/shell.py", line 717, in main
    map(encodeutils.safe_decode, sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/zunclient/shell.py", line 654, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/zunclient/v1/containers_shell.py", line 231, in do_list
    containers = cs.containers.list(**opts)
  File "/usr/lib/python2.7/site-packages/zunclient/v1/containers.py", line 90, in list
    "containers")
  File "/usr/lib/python2.7/site-packages/zunclient/common/base.py", line 128, in _list
    resp, body = self.api.json_request('GET', url)
  File "/usr/lib/python2.7/site-packages/zunclient/common/httpclient.py", line 367, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/zunclient/common/httpclient.py", line 347, in _http_request
    error_json = _extract_error_json(resp.content)
  File "/usr/lib/python2.7/site-packages/zunclient/common/httpclient.py", line 55, in _extract_error_json
    error_body = body_json['errors'][0]
KeyError: 'errors'
ERROR: 'errors'

Revision history for this message
hongbin (hongbin034) wrote :
Changed in zun:
assignee: nobody → feng.shengqin@zte.com.cn (feng-shengqin)
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-zunclient 3.3.0

This issue was fixed in the openstack/python-zunclient 3.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.