c491c3ee61
Throughout the API code we keep catching NotFound exceptions in their various forms and converting them to webob.exc.HTTPNotFound exceptions, but we can leave the WSGI fault handler convert them on its own. This patch changes current behavior and removes the exception handling closer to the operation so that those exceptions can be handled at the WSGI level. This has the following benefits: - Reduces code complexity - Increases code readability - Provides consistent error responses, as messages are stored on the Exceptions. - Prevents raising errors with only partial information (we have cases now that were removing the UUID from the message because they used a custom message). For example: before returned error would be "The resource could not be found", and now we raise "Volume type encryption for type 4e9e6d23-eed0-426d-b90a-28f87a94b6fe does not exist." automatically. - Reduces workload for the translation team because we remove all unnecessary custom messages. Change-Id: I09f98921fdc2400cc3f6056e59001100abe06920 |
||
---|---|---|
.. | ||
__init__.py | ||
limits.py | ||
router.py | ||
snapshot_metadata.py | ||
snapshots.py | ||
types.py | ||
volume_metadata.py | ||
volumes.py |