Page MenuHomeSoftware Heritage

RPC server: Do not log exceptions with 4xx HTTP status codes
ClosedPublic

Authored by vlorentz on Fri, Aug 5, 4:30 PM.

Details

Summary

They are client errors, therefore it does not make sense to log them
as exceptions (which is only useful for debugging the server).

eg. P1417

Diff Detail

Repository
rDCORE Foundations and core functionalities
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 D8203 (id=29599)

Rebasing onto c824e4b66f...

Current branch diff-target is up to date.
Changes applied before test
commit e8253c54f3bddb1235805bdfc38f6f35c1e6bfc7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 5 16:30:15 2022 +0200

    RPC server: Do not log exceptions with 4xx HTTP status codes
    
    They are client errors, therefore it does not make sense to log them
    as exceptions (which is only useful for debugging the server).

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

olasd added a subscriber: olasd.

This could probably be logger.exception instead of an unqualified logging.exception

This revision is now accepted and ready to land.Fri, Aug 5, 4:34 PM