mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-05 16:48:31 -04:00
Change validation error message to a string from a dict.
This commit is contained in:
@@ -18,7 +18,7 @@ def build_error_message(errors, schema):
|
||||
field = "'{}' {}".format(e.path[0], e.schema.get('validationMessage')) if e.schema.get(
|
||||
'validationMessage') else e.message
|
||||
s = field.split("'")
|
||||
field = OrderedDict({"error": "ValidationError", "message": {s[1]: s[2].strip()}})
|
||||
field = OrderedDict({"error": "ValidationError", "message": "{}{}".format(s[1], s[2])})
|
||||
fields.append(field)
|
||||
message = {
|
||||
"status_code": 400,
|
||||
|
||||
Reference in New Issue
Block a user