Skip to content

Commit

Permalink
add changelog for #19
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Merickel committed Sep 30, 2019
1 parent 889821b commit 65a5fdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
unreleased
==========

- Add ``exception`` and ``response`` attributes to the
``pyramid_retry.IBeforeRetry`` event.
See https://github.com/Pylons/pyramid_retry/pull/19

2.0 (2019-06-06)
================

Expand Down
6 changes: 5 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ on the ``environ`` itself that needs to be reset prior to the retry attempt.
@subscriber(IBeforeRetry)
def retry_event(event):
print('A retry is about to occur.')
print(f'A retry is about to occur due to {event.exception}.')
The ``exception`` attribute indicates the exception that triggered the retry.
The exception may come from either ``request.exception`` if it was caught and
a response was rendered, or it may come from an uncaught exception.

Caveats
=======
Expand Down

0 comments on commit 65a5fdd

Please sign in to comment.