Skip to content

Commit

Permalink
Merge pull request #559 from maykinmedia/fix/1274-silence-nrc-role-re…
Browse files Browse the repository at this point in the history
…trieval

[#1274] Downgraded ZGW role-retrieval's error-level in notification handler for less Sentry spam
  • Loading branch information
alextreme authored Mar 27, 2023
2 parents 6eed780 + 78db5ce commit 4487bdd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/open_inwoner/openzaak/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def handle_zaken_notification(notification: Notification):
if not roles:
log_system_action(
f"ignored {r} notification: cannot retrieve rollen for case {case_url}",
log_level=logging.ERROR,
# NOTE this used to be logging.ERROR, but as this is also our first call we get a lot of 403 "Niet geautoriseerd voor zaaktype"
log_level=logging.INFO,
)
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def test_zio_bails_when_no_roles_found_for_case(self, m, mock_handle: Mock):
self.assertTimelineLog(
"ignored zaakinformatieobject notification: cannot retrieve rollen for case https://",
lookup=Lookups.startswith,
level=logging.ERROR,
level=logging.INFO,
)

def test_zio_bails_when_no_emailable_users_are_found_for_roles(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_status_bails_when_no_roles_found_for_case(self, m, mock_handle: Mock):
self.assertTimelineLog(
"ignored status notification: cannot retrieve rollen for case https://",
lookup=Lookups.startswith,
level=logging.ERROR,
level=logging.INFO,
)

def test_status_bails_when_no_emailable_users_are_found_for_roles(
Expand Down

0 comments on commit 4487bdd

Please sign in to comment.