Improve error code for invalid secret creation with KMIP
When using KMIP backend, error handling around invalid key specificaion is modified to return more specific 400 error. Change-Id: I080aac88c2a055ecfc59e63f840c0d2d12c38d00 Closes-Bug: 1546366
This commit is contained in:
parent
e4c39f69a2
commit
5150c87906
@ -64,9 +64,16 @@ class SecretStorePluginNotFound(exception.BarbicanHTTPException):
|
|||||||
super(SecretStorePluginNotFound, self).__init__(message)
|
super(SecretStorePluginNotFound, self).__init__(message)
|
||||||
|
|
||||||
|
|
||||||
class SecretStoreSupportedPluginNotFound(exception.BarbicanException):
|
class SecretStoreSupportedPluginNotFound(exception.BarbicanHTTPException):
|
||||||
"""Raised if no plugins are found that support the requested operation."""
|
"""Raised if no plugins are found that support the requested operation."""
|
||||||
message = u._("Secret store plugin not found for requested operation.")
|
|
||||||
|
client_message = u._("Secret store supported plugin not found.")
|
||||||
|
status_code = 400
|
||||||
|
|
||||||
|
def __init__(self, plugin_name=None):
|
||||||
|
message = u._("Secret store plugin not found for requested operation.")
|
||||||
|
super(SecretStoreSupportedPluginNotFound, self).__init__(
|
||||||
|
message)
|
||||||
|
|
||||||
|
|
||||||
class SecretContentTypeNotSupportedException(exception.BarbicanHTTPException):
|
class SecretContentTypeNotSupportedException(exception.BarbicanHTTPException):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user