Skip to content

Commit

Permalink
Merge pull request #72 from cloud-gov/fix-no-urls
Browse files Browse the repository at this point in the history
fix: throw an error when no urls are found
  • Loading branch information
drewbo authored Oct 29, 2024
2 parents c5a5261 + 3b7fc3d commit d40cc71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tasks/a11y/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ def handler(self):
os.getenv('LOGLEVEL', 'debug').upper()
)
)

# error for 0 urls, cap at url_limit
if len(data) == 0:
raise Exception("0 urls found")

self.logger.info(f'{len(data)} urls found')
url_limit = 400
if len(data) > url_limit:
Expand Down

0 comments on commit d40cc71

Please sign in to comment.