Skip to content

Commit

Permalink
chore(osv): Improve the failure case of getVulnerabilitiesForIds()
Browse files Browse the repository at this point in the history
Provide an exception message which tells for which exact identifier the
vulnerability (details) could not be obtained.

Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Sep 19, 2023
1 parent 5a92da8 commit 2ce373d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clients/osv/src/main/kotlin/OsvService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ class OsvService(serverUrl: String? = null, httpClient: OkHttpClient? = null) {
}

override fun onFailure(call: Call<Vulnerability>, t: Throwable) {
failureThrowable.set(t)
val exception = IOException("Could not get vulnerability information for '$id'.", t)
failureThrowable.set(exception)
latch.countDown()
}
})
Expand Down

0 comments on commit 2ce373d

Please sign in to comment.