-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance exception translation to better handle NeutronExceptions
NeutronExceptions have a 'message' class attribute that holds the generic error message template, e.g. "Network %(network)s not found", unfortunately, because the names are the same, it was overshadowing the actual exception instance 'message', e.g. "Network 1 not found", after translation when the exception was serialized to JSON. This patch puts the exception's actual message in a new field called 'msg' and overwrites NeutronException unicode() so that 'msg' is used during serialization and we'll get the correct message on the REST API response. Fixes bug: #1212882 Change-Id: I3965bffb1c2c2eee0af440d1ecd30ccb3bb958d5
- Loading branch information
1 parent
ca99b92
commit 7e2622c
Showing
3 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters