Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround for a bug in flask-pydantic. Avoids the following exception causing server to respond with HTTP 500: Traceback (most recent call last): File "/venv/lib64/python3.11/site-packages/flask_pydantic/core.py", line 197, in wrapper b = body_model(**body_params) ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: resultsdb.parsers.api_v3.BrewResultParams() argument after ** must be a mapping, not str During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/venv/lib64/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib64/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib64/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib64/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib64/python3.11/site-packages/flask_pyoidc/flask_pyoidc.py", line 463, in wrapper return view_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/venv/lib64/python3.11/site-packages/flask_pydantic/core.py", line 204, in wrapper raise JsonBodyParsingError() flask_pydantic.exceptions.JsonBodyParsingError Server will respond instead with HTTP 400 and the following JSON body: { "validation_error": { "body_params": [{ "loc": ["__root__"], "msg": "value is not a valid dict", "type": "type_error.dict" }] } } JIRA: RHELWF-10108
- Loading branch information