diff --git a/.github/workflows/urls-check.yml b/.github/workflows/urls-check.yml index 8974ef78d7f6..fb5f587dcf52 100644 --- a/.github/workflows/urls-check.yml +++ b/.github/workflows/urls-check.yml @@ -7,7 +7,8 @@ on: jobs: urls-check: runs-on: ubuntu-latest - permissions: {} + permissions: + issues: write steps: - name: Set up configuration and secrets run: | diff --git a/tools/urls-check b/tools/urls-check index 6c36094dcd73..8459db7e672b 100755 --- a/tools/urls-check +++ b/tools/urls-check @@ -123,9 +123,9 @@ def check_urls(verbose): if resp.geturl() != url and not any(fnmatch.fnmatch(url, pattern) for pattern in KNOWN_REDIRECTS): redirects.append(url) if resp.getcode() >= 400: - failed.append(url) - except urllib.error.URLError: - failed.append(url) + failed.append(f"{url} : {resp.getcode()} {resp.reason}") + except urllib.error.URLError as e: + failed.append(f"{url} : {e.code} {e.reason}") err = "" success = ""