Skip to content

Commit

Permalink
Better error message when unable to connect to container
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrtalbot committed May 2, 2023
1 parent 1087e8f commit f067e87
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,23 +332,13 @@ def check_process_section(self, lines, fix_version, progress_bar):
self.failed.append(("container_links", "Unable to connect to container URL", self.main_nf))
continue
if not response.ok:
if response.status_code in [400, 401, 402, 403]:
self.warned.append(
(
"container_links",
f"Access to container {response.url} denied, status code: {response.status_code}",
self.main_nf,
)
)

else:
self.failed.append(
(
"container_links",
f"Unable to connect to {response.url}, status code: {response.status_code}",
self.main_nf,
)
self.failed.append(
(
"container_links",
f"Unable to connect to {response.url}, status code: {response.status_code}",
self.main_nf,
)
)

# Check that all bioconda packages have build numbers
# Also check for newer versions
Expand Down

0 comments on commit f067e87

Please sign in to comment.