]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add hook to translate exceptions into HTTP codes
authorKevin Benton <blak111@gmail.com>
Thu, 11 Jun 2015 09:28:33 +0000 (02:28 -0700)
committerKevin Benton <kevinbenton@buttewifi.com>
Sat, 1 Aug 2015 18:55:03 +0000 (18:55 +0000)
commit72c40a5bb7d6f659ca8ef8ed785f889383795462
tree73ae55a2660b0a0e5d325bf064f27ac091e5fe15
parent0a46c8542817b3f4a5f88e298696072f4708671a
Add hook to translate exceptions into HTTP codes

Adds a hook to catch neutron exceptions and translate them into
a corresponding HTTP error code. If no corresponding code is found,
an HTTP 500 is returned with the original exception logged so
internal state isn't leaked to the user.

Partially-Implements: blueprint wsgi-pecan-switch
Co-Authored-By: Brandon Logan <brandon.logan@rackspace.com>
Change-Id: Ia25733d6e394e034995890c806ed04e387d4ab58
neutron/newapi/app.py
neutron/newapi/controllers/root.py
neutron/newapi/hooks/__init__.py [new file with mode: 0644]
neutron/newapi/hooks/translation.py [new file with mode: 0644]
neutron/tests/functional/newapi/test_functional.py