Skip to content

Commit

Permalink
Changed log level for invalid response body from info to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Fechner committed May 19, 2024
1 parent 9a10f29 commit 5453c71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions connexion/validators/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def _validate(self, body: t.Any) -> t.Optional[dict]:

class DefaultsJSONRequestBodyValidator(JSONRequestBodyValidator):
"""Request body validator for json content types which fills in default values. This Validator
intercepts the body, makes changes to it, and replays it for the next ASGI application."""
intercepts the body, makes changes to it, and replays it for the next ASGI application.
"""

MUTABLE_VALIDATION = True
"""This validator might mutate to the body."""
Expand Down Expand Up @@ -129,7 +130,7 @@ def _validate(self, body: dict):
self.validator.validate(body)
except ValidationError as exception:
error_path_msg = format_error_with_path(exception=exception)
logger.info(
logger.warning(
f"Validation error: {exception.message}{error_path_msg}",
extra={"validator": "body"},
)
Expand Down

0 comments on commit 5453c71

Please sign in to comment.