Merge pull request #2601 from sherlock-project/feat/graceful-skip

feat: gracefully skip sites with invalid errorType
This commit is contained in:
Paul Pfeister 2025-10-04 20:23:07 -04:00 committed by GitHub
commit e44fe49c8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 47 additions and 50 deletions

View File

@ -429,12 +429,9 @@ def sherlock(
else:
if any(errtype not in ["message", "status_code", "response_url"] for errtype in error_type):
# It should be impossible to ever get here...
raise ValueError(
f"Unknown Error Type '{error_type}' for "
f"site '{social_network}'"
)
error_context = f"Unknown error type '{error_type}' for {social_network}"
query_status = QueryStatus.UNKNOWN
else:
if "message" in error_type:
# error_flag True denotes no error found in the HTML
# error_flag False denotes error found in the HTML