Skip to content

Commit

Permalink
Merge pull request #60 from opendata-swiss/fix_link_checker_msg
Browse files Browse the repository at this point in the history
Update link checker notification messages
  • Loading branch information
kovalch authored Apr 15, 2024
2 parents 826df10 + af7dce6 commit d56b9e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckan_pkg_checker/utils/request_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ def _check_with_user_agent(test_url, http_method, user_agent):
)
# ignore 405 Method Not Allowed errors
if 405 != e.response.status_code:
return str(e) # Return the error message
if 404 == e.response.status_code:
return "Failed to load resource: the server responded with a status of 404 (Not Found)"
else:
return str(e) # Return the error message
except (ValueError, requests.exceptions.RequestException) as e:
log.debug(
"REQUEST EXCEPTION OCCURRED for URL %s (%s): %r"
Expand Down

0 comments on commit d56b9e9

Please sign in to comment.