Page MenuHomeSoftware Heritage

backends: Report only relevant exceptions to sentry
ClosedPublic

Authored by anlambert on Apr 14 2022, 11:14 AM.

Details

Summary

When catching KeycloakError exceptions, other exception types
will be then raised like ValueError or AuthenticationFailed.

Those will be processed by django applications using these auth
middlewares so there is no need to duplicate error reports in
sentry here.

Diff Detail

Repository
rDAUTH Common authentication libraries
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7575 (id=27442)

Rebasing onto 882f35e490...

Current branch diff-target is up to date.
Changes applied before test
commit 7fddad7eb2b8d3eb797b38cc277e6d11a5679fee
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Apr 14 11:06:06 2022 +0200

    backends: Report only relevant exceptions to sentry
    
    When catching KeycloakError exceptions, other exception types
    will be then raised like ValueError or AuthenticationFailed.
    
    Those will be processed by django applications using these auth
    middlewares so there is no need to duplicate error reports in
    sentry here.

See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/87/ for more details.

This revision is now accepted and ready to land.Apr 14 2022, 12:10 PM