Skip to content

Commit

Permalink
add another trusted host
Browse files Browse the repository at this point in the history
and try a better error msg

Signed-off-by: Doug Davis <[email protected]>
  • Loading branch information
duglin committed Nov 20, 2024
1 parent b131f97 commit 6fd073d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/test_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async def test_app(monkeypatch):
} == {
(
PurePosixPath("fake-docs/link-verification.md"),
"Could Not access 'http://non-existing-website.sadkjaskldjalksjd'",
"Could Not access 'http://non-existing-website.sadkjaskldjalksjd': ClientConnectorError>]",
),
(
PurePosixPath("fake-docs/link-verification.md"),
Expand Down
6 changes: 4 additions & 2 deletions tools/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ async def _uri_availability_issues(uri: HttpUri, settings: Settings) -> Sequence
if "example.com" in uri: return []
if "ietf.org" in uri: return []
if "rfc-edit.org" in uri: return []
if "iso20022.org" in uri: return []

try:
for attempt in Retrying(stop=stop_after_attempt(settings.http_max_get_attemps)):
Expand All @@ -151,8 +152,9 @@ async def _uri_availability_issues(uri: HttpUri, settings: Settings) -> Sequence
case _:
return [] # no issues

except Exception: # noqa
return [Issue(f"Could Not access {repr(uri)}")]
except Exception as e: # noqa
myerr = str(e).split("raised",1)[1]
return [Issue(f"Could Not access {repr(uri)}: {myerr}")]
else:
return []

Expand Down

0 comments on commit 6fd073d

Please sign in to comment.