Fix Incorrect Exception when metadata is over 255 characters
Need to be in sync with Essex. Throw a new exception in api.py when key or value is over 255 chars. Catch this exception end return back HTTP error 413. add extra lines in exception.py to make pep8 happy Fixes bug 1004007 Change-Id: I67694e3a9600b7dd0b80c519327327568751c2a4
This commit is contained in:
@@ -263,6 +263,10 @@ class InvalidMetadata(Invalid):
|
||||
message = _("Invalid metadata") + ": %(reason)s"
|
||||
|
||||
|
||||
class InvalidMetadataSize(Invalid):
|
||||
message = _("Invalid metadata size") + ": %(reason)s"
|
||||
|
||||
|
||||
class InvalidPortRange(Invalid):
|
||||
message = _("Invalid port range %(from_port)s:%(to_port)s. %(msg)s")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user