← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1355902] [NEW] neutron HTTP exceptions have invalid format

 

Public bug reported:

The python neutron client expects for the v2 API expects the neutron API
to send exceptions as a structure which has type, message and details.
While this is so for exceptions.NeutronException and
netaddr.AddrFormatError, in case of webob.exc.HTTPException  only
exception message is returned. This leads to error when exception's
'message' or 'details' attributes are attempted to be extracted in the
neutronclient session and the AttributeError in raised instead:

ash@precise64:~/devstack$ neutron firewall-rule-create --source-ip-address 10.2.0.453 --protocol tcp --action allow  /* create rule with invalid source ip address */
AttributeError: "'unicode' object has no attribute 'get'"

That's why neutron should send type and detail of an exception in the
body of a message.

** Affects: neutron
     Importance: Undecided
     Assignee: Elena Ezhova (eezhova)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => Elena Ezhova (eezhova)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1355902

Title:
  neutron HTTP exceptions have invalid format

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  The python neutron client expects for the v2 API expects the neutron
  API to send exceptions as a structure which has type, message and
  details. While this is so for exceptions.NeutronException and
  netaddr.AddrFormatError, in case of webob.exc.HTTPException  only
  exception message is returned. This leads to error when exception's
  'message' or 'details' attributes are attempted to be extracted in the
  neutronclient session and the AttributeError in raised instead:

  ash@precise64:~/devstack$ neutron firewall-rule-create --source-ip-address 10.2.0.453 --protocol tcp --action allow  /* create rule with invalid source ip address */
  AttributeError: "'unicode' object has no attribute 'get'"

  That's why neutron should send type and detail of an exception in the
  body of a message.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1355902/+subscriptions


Follow ups

References