Skip to content

Commit

Permalink
avoid traceback on log owsexception (#95)
Browse files Browse the repository at this point in the history
* avoid traceback exception dump as 'error' in case of raised OWSException indicating a valid unauthorized check

* update changelog
  • Loading branch information
fmigneault authored Feb 20, 2020
1 parent 233f714 commit fc32e7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changes
Unreleased
==========

Changes:

* Reduce log level of ``"failed security check"`` from ``exception`` to ``warning`` as it corresponds to the expected
code behavior (unauthorised access) when ``OWSException`` is raised, instead of dumping an unhandled error traceback.

0.5.2 (2019-07-11)
==================

Expand Down
2 changes: 1 addition & 1 deletion twitcher/tweens.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def ows_security_tween(request):
security.check_request(request)
return handler(request)
except OWSException as err:
LOGGER.exception("security check failed.")
LOGGER.warning("security check failed.")
return err
except Exception as err:
LOGGER.exception("unknown error")
Expand Down

0 comments on commit fc32e7d

Please sign in to comment.