Ensure to use exception per status code for all cases
Previously, only when an exception has a content with
{'NeutronError': {'type': xxxx, 'message': xxxx}},
exception per status code is raised from neutronclient library.
There are cases where this kind of message is not contained
in exception messages, for example, some extension is loaded.
Library users expect an exception is raised based on response
status code and it should not depend on an exception message.
This commit applies a fallback logic to map generic per-status
exception to all exception types from the neutron server.
Reviewed: https:/ /review. openstack. org/253267 /git.openstack. org/cgit/ openstack/ python- neutronclient/ commit/ ?id=af1a55bfd2e 47b0e3cd8349f0a 9b1277474fee18
Committed: https:/
Submitter: Jenkins
Branch: master
commit af1a55bfd2e47b0 e3cd8349f0a9b12 77474fee18
Author: Akihiro Motoki <email address hidden>
Date: Fri Dec 4 01:53:58 2015 +0900
Ensure to use exception per status code for all cases
Previously, only when an exception has a content with ror': {'type': xxxx, 'message': xxxx}},
{'NeutronEr
exception per status code is raised from neutronclient library.
There are cases where this kind of message is not contained
in exception messages, for example, some extension is loaded.
Library users expect an exception is raised based on response
status code and it should not depend on an exception message.
This commit applies a fallback logic to map generic per-status
exception to all exception types from the neutron server.
Closes-Bug: #1513879 4b12217b3404d40 443d61fc2c0
Change-Id: Ib3d0a8359aed44