Change invalid date error code to 400
The create lease API and the update lease API returned a 500 response status code when the date format is invalid. But this should be 400 BadRequest as well as wrong time order (InvalidInput) exception. This patch changes it to return a 400 response status code. Change-Id: I7f259d06d8b5e0b901126064a21d313497721e1b
This commit is contained in:
parent
84785b7dde
commit
02c7010961
|
@ -82,6 +82,7 @@ class EventError(exceptions.BlazarException):
|
|||
|
||||
|
||||
class InvalidDate(exceptions.BlazarException):
|
||||
code = 400
|
||||
msg_fmt = _(
|
||||
'%(date)s is an invalid date. Required format: %(date_format)s')
|
||||
|
||||
|
|
Loading…
Reference in New Issue