Skip to content

Commit

Permalink
fix: don't show file_content in test results error
Browse files Browse the repository at this point in the history
it doesn't really help much and it causes errors if you try to decode a
file that isn't utf-8 so just don't do it
  • Loading branch information
joseph-sentry committed Nov 27, 2024
1 parent dc9a05a commit 54c0140
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tasks/test_results_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ class ReadableFile:


class ParserFailureError(Exception):
def __init__(self, err_msg, file_content, parser="", parser_err_msg=""):
def __init__(self, err_msg, parser="", parser_err_msg=""):
self.err_msg = err_msg
self.file_content = file_content
self.parser = parser
self.parser_err_msg = parser_err_msg

Expand Down Expand Up @@ -466,7 +465,6 @@ def process_individual_arg(
repoid=upload.report.commit.repoid,
commitid=upload.report.commit_id,
uploadid=upload.id,
file_content=exc.file_content,
parser_err_msg=exc.parser_err_msg,
),
)
Expand Down Expand Up @@ -510,7 +508,6 @@ def parse_single_file(
)
raise ParserFailureError(
err_msg="Error parsing file",
file_content=file_content.decode()[:300],
parser_err_msg=str(e),
) from e
metrics.incr(
Expand Down

0 comments on commit 54c0140

Please sign in to comment.