From d26f24176ae8761ee6fce9cd557198047759bcff Mon Sep 17 00:00:00 2001 From: matt-codecov <137832199+matt-codecov@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:12:39 -0700 Subject: [PATCH] add UploadErrorCode enum for use in worker/api (#355) --- shared/upload/constants.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/shared/upload/constants.py b/shared/upload/constants.py index 1d6808b1c..4a5d4ab4e 100644 --- a/shared/upload/constants.py +++ b/shared/upload/constants.py @@ -1,3 +1,5 @@ +from enum import StrEnum + ci = { "travis": { "title": "Travis-CI", @@ -220,3 +222,13 @@ "bitbucket", "bitbucket_server", ] + + +class UploadErrorCode(StrEnum): + FILE_NOT_IN_STORAGE = "file_not_in_storage" + REPORT_EXPIRED = "report_expired" + REPORT_EMPTY = "report_empty" + + # We don't want these - try to add error cases when they arise + UNKNOWN_PROCESSING = "unknown_processing" + UNKNOWN_STORAGE = "unknown_storage"