Page MenuHomeSoftware Heritage

common: Log traceback of exception caught in view error handler
ClosedPublic

Authored by anlambert on Tue, Feb 16, 2:31 PM.

Details

Summary

Traceback of an exception caught in a django view error handler was included
in error responses but not logged to stderr.

While the exception traceback is clearly readable in browse error pages, it
is not in Web API responses because of the JSON format.

So ensure the traceback is also logged to stderr for better debugging.

Diff Detail

Repository
rDWAPPS Web applications
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 D5082 (id=18143)

Rebasing onto f47a349d2c...

Current branch diff-target is up to date.
Changes applied before test
commit 97c6996555d52cf96db2effb294f9f05a0688481
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Feb 16 14:26:33 2021 +0100

    common: Log traceback of exception caught in view error handler
    
    Traceback of an exception caught in a django view error handler was included
    in error responses but not logged to stderr.
    
    While the exception traceback is clearly readable in browse error pages, it
    is not in Web API responses because of the JSON format.
    
    So ensure the traceback is also logged to stderr for better debugging.

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

This revision is now accepted and ready to land.Tue, Feb 16, 2:41 PM