aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-09-02 07:38:41 +0200
committerMichał Górny <mgorny@gentoo.org>2021-09-02 07:38:41 +0200
commita361f8f2a37c32b5472422245a57581cd5788934 (patch)
tree49341efeb7941dd49b1c258eb6fdc52069f4fc02
parentgpy-impl-list: Include proper error handling (diff)
downloadqa-scripts-a361f8f2.tar.gz
qa-scripts-a361f8f2.tar.bz2
qa-scripts-a361f8f2.zip
get-git-file: Issue 503 when commit is not found
Issue 503 to suggest retrying more aggressively when the requested commit is not found. It usually means that the CI reports haven't been fetched yet. Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rwxr-xr-xcgi-bin/get-git-file.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgi-bin/get-git-file.sh b/cgi-bin/get-git-file.sh
index 9451d1e..9721f71 100755
--- a/cgi-bin/get-git-file.sh
+++ b/cgi-bin/get-git-file.sh
@@ -61,7 +61,8 @@ main() {
lfile=${file}
tree=( $(git ls-tree "${commit}" "${lfile}" 2>/dev/null) )
if [[ ! ${tree[*]} ]]; then
- echo "Status: 404 Not Found"
+ echo "Status: 503 Service Unavailable"
+ echo "Retry-After: 30"
echo
echo "404 Not Found (if the report was just published, you may need to wait a minute or two for sync)"
exit 0