We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 366fa6f commit 582687fCopy full SHA for 582687f
src/opengeodeweb_back/utils_functions.py
@@ -85,14 +85,16 @@ def validate_request(request, schema):
85
validate(json_data)
86
except fastjsonschema.JsonSchemaException as e:
87
error_msg = str(e)
88
-
+
89
if "data must contain" in error_msg:
90
field = error_msg.split("data must contain ['")[1].split("']")[0]
91
error_msg = f"'{field}' is a required property"
92
elif "data must not contain" in error_msg:
93
field = error_msg.split("data must not contain {'")[1].split("'")[0]
94
- error_msg = f"Additional properties are not allowed ('{field}' was unexpected)"
95
+ error_msg = (
+ f"Additional properties are not allowed ('{field}' was unexpected)"
96
+ )
97
98
flask.abort(400, f"Validation error: {error_msg}")
99
100
0 commit comments