Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit e50b2c8

Browse files
committed
use new UploadErrorCode value for processing timeouts
1 parent 0026a62 commit e50b2c8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

services/report/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,17 @@ def build_report_from_raw_content(
678678
result.error = ProcessingError(code=UploadErrorCode.REPORT_EMPTY, params={})
679679
raw_report_info.error = result.error
680680
return result
681+
except SoftTimeLimitExceeded as e:
682+
sentry_sdk.capture_exception(e)
683+
log.warning(
684+
"Timed out while processing report", extra=dict(reportid=reportid)
685+
)
686+
result.error = ProcessingError(
687+
code=UploadErrorCode.PROCESSING_TIMEOUT, params={}
688+
)
689+
raw_report_info.error = result.error
690+
# Return and attempt to save the error result rather than re-raise
691+
return result
681692
except Exception as e:
682693
sentry_sdk.capture_exception(e)
683694
log.exception(

0 commit comments

Comments
 (0)