Skip to content

Commit

Permalink
Temp commit for testing Sentry exception captures
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchamp committed May 8, 2024
1 parent 8298d5e commit 2323d18
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions openlibrary/plugins/upstream/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,3 +1332,20 @@ def get_loan_history_data(page: int, mb: "MyBooksTemplate") -> dict[str, Any]:
'limit': limit,
'page': page,
}


class test_handled_exception_logging(delegate.page):
path = '/_test/handle/exception'

def GET(self):
result = ''
try:
ex = OLAuthenticationError('undefined_error')
ex.creation_ts = datetime.now()
raise ex
except OLAuthenticationError as e:
result = e.creation_ts

Check failure on line 1348 in openlibrary/plugins/upstream/account.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (W293)

openlibrary/plugins/upstream/account.py:1348:1: W293 Blank line contains whitespace
return delegate.RawText(result)

Check failure on line 1350 in openlibrary/plugins/upstream/account.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (W293)

openlibrary/plugins/upstream/account.py:1350:1: W293 Blank line contains whitespace

Check failure on line 1351 in openlibrary/plugins/upstream/account.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (W293)

openlibrary/plugins/upstream/account.py:1351:1: W293 Blank line contains whitespace

0 comments on commit 2323d18

Please sign in to comment.