• mo khan's avatar
    Return empty report instead of raising error · 195e3aad
    mo khan authored
    The backtrace and context of the original error is lost
    when we rescue and raise a new error. This makes it difficult
    to debug.
    
    If a report has been tampered with and is invalid
    it is safer to return an empty report than to
    bubble up an error that cannot be dealt with
    meaningfully by clients of the parser code.
    
    There is no action that we can take
    when a JSON parse error occurs due to
    an invalid JSON document. Re-processing
    the document will not yield a different result.
    
    It is very easy to upload a `gl-license-scanning-report.json`
    that is not a valid JSON document. This change stops recording
    errors that we cannot take action on.
    195e3aad
sentry-1350443.yml 135 Bytes