97
97
ERROR_ONLY_ALLOW_MERGES = "Only allow merges, disallow rebase and squash"
98
98
ERROR_RTD_SUBPROJECT_MISSING = "ReadTheDocs missing as a subproject on CircuitPython"
99
99
ERROR_RTD_ADABOT_MISSING = "ReadTheDocs project missing adabot as owner"
100
- ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS = "Failed to load RTD build status"
100
+ ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS = (
101
+ "Failed to load RTD build status (General error)"
102
+ )
103
+ ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS_GH_NONLIMITED = (
104
+ "Failed to load RTD build status (GitHub error)"
105
+ )
106
+ ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS_RTD_NONLIMITED = (
107
+ "Failed to load RTD build status (RTD error)"
108
+ )
109
+ ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS_RTD_UNEXPECTED_RETURN = (
110
+ "Failed to load RTD build status (Unknown error)"
111
+ )
101
112
ERROR_RTD_SUBPROJECT_FAILED = "Failed to list CircuitPython subprojects on ReadTheDocs"
102
113
ERROR_RTD_OUTPUT_HAS_WARNINGS = "ReadTheDocs latest build has warnings and/or errors"
103
114
ERROR_GITHUB_NO_RELEASE = "Library repository has no releases"
@@ -865,7 +876,7 @@ def validate_readthedocs(self, repo):
865
876
time .sleep (sleep_time .seconds )
866
877
continue
867
878
except pygithub .GithubException :
868
- errors .append (ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS )
879
+ errors .append (ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS_GH_NONLIMITED )
869
880
return errors
870
881
871
882
readme_text = content_file .decoded_content .decode ("utf-8" )
@@ -890,7 +901,7 @@ def validate_readthedocs(self, repo):
890
901
if error_message == "Not found." or not error_message .startswith (
891
902
"Request was throttled."
892
903
):
893
- errors .append (ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS )
904
+ errors .append (ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS_RTD_NONLIMITED )
894
905
return errors
895
906
time_result = parse .search (
896
907
"Request was throttled. Expected available in {throttled:d} seconds." ,
@@ -903,7 +914,7 @@ def validate_readthedocs(self, repo):
903
914
# Return the results of the latest run
904
915
doc_build_results = json_response .get ("results" )
905
916
if doc_build_results is None :
906
- errors .append (ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS )
917
+ errors .append (ERROR_RTD_FAILED_TO_LOAD_BUILD_STATUS_RTD_UNEXPECTED_RETURN )
907
918
return errors
908
919
result = doc_build_results [0 ].get ("success" )
909
920
time .sleep (3 )
0 commit comments