Skip to content

Commit

Permalink
fix: throw an error when no urls are found (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbo committed Oct 28, 2024
1 parent c5a5261 commit 3b7fc3d
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 3b7fc3d

Please sign in to comment.