format of exceptions now always follows baseline format. 'errors'-key is always a list of dictionaries.
This commit is contained in:
parent
4f88e493d9
commit
7a97cd7d95
@ -35,7 +35,8 @@ def create_validation_error_response(ex:ValidationError, status_code:int=400, cr
|
||||
errors = {"undefined_schema":errors}
|
||||
errors = {k:v if isinstance(v,list) else [v] for k,v in errors.items()}
|
||||
|
||||
# hence, errors always has the following type: dict[str, list[str]]
|
||||
# hence, errors always has the following type: list[dict[str, list[str]]]
|
||||
errors = [errors]
|
||||
|
||||
|
||||
# example:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user