diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-09-02 07:38:41 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-09-02 07:38:41 +0200 |
commit | a361f8f2a37c32b5472422245a57581cd5788934 (patch) | |
tree | 49341efeb7941dd49b1c258eb6fdc52069f4fc02 /cgi-bin | |
parent | gpy-impl-list: Include proper error handling (diff) | |
download | qa-scripts-a361f8f2a37c32b5472422245a57581cd5788934.tar.gz qa-scripts-a361f8f2a37c32b5472422245a57581cd5788934.tar.bz2 qa-scripts-a361f8f2a37c32b5472422245a57581cd5788934.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>
Diffstat (limited to 'cgi-bin')
-rwxr-xr-x | cgi-bin/get-git-file.sh | 3 |
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 |