Skip to content

Commit

Permalink
Upgrade to webargs 6.0.0 which raises error for unknown arguments
Browse files Browse the repository at this point in the history
Fix rotki#532

If an invalid/unknown argument is given to an endpoint then an error
is now properly raised
  • Loading branch information
LefterisJP committed Mar 11, 2020
1 parent 4698037 commit e323496
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 40 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ flask-cors==3.0.8
flask-restful==0.3.7
flask==1.1.1
marshmallow==3.2.1
webargs==5.5.2
webargs==6.0.0


#constraints
Expand Down
4 changes: 2 additions & 2 deletions rotkehlchen/api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def handle_request_parsing_error(
err: ValidationError,
_request: werkzeug.local.LocalProxy,
_schema: Schema,
_err_status_code: Optional[int],
_err_headers: Optional[Dict],
error_status_code: Optional[int], # pylint: disable=unused-argument
error_headers: Optional[Dict], # pylint: disable=unused-argument
) -> None:
""" This handles request parsing errors generated for example by schema
field validation failing."""
Expand Down

0 comments on commit e323496

Please sign in to comment.