Skip to content

Guard against None response in fetch_vulnerabilities#2095

Open
rishabh23rohil wants to merge 1 commit intoaboutcode-org:mainfrom
rishabh23rohil:fix-vulnerablecode-none-guard
Open

Guard against None response in fetch_vulnerabilities#2095
rishabh23rohil wants to merge 1 commit intoaboutcode-org:mainfrom
rishabh23rohil:fix-vulnerablecode-none-guard

Conversation

@rishabh23rohil
Copy link
Contributor

bulk_search_by_purl() can return None when the VulnerableCode API is unreachable or returns an error. This causes a TypeError on the next line when iterating the response. Added a guard to skip failed batches. Also added a missing docstring and debug logging to request_post() for consistency with request_get().

Signed-off-by: Rishabh Rohil <rishabhrohil024@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant