osv.dev icon indicating copy to clipboard operation
osv.dev copied to clipboard

Querybatch returns 400 when there is a malformed PURL in the batch

Open SouravJohar opened this issue 9 months ago • 0 comments

Hi,

In the case where one of the PURLs in a batch is malformed, the querybatch returns a 400 for the entire batch without specifying which PURL(s) were malformed. Would it be possible to either:

  1. Return vulnerability information for the Valid PURLs, and an error for the invalid PURL(s)? I.e a 200 for the overall request, but an "error" field for the malformed PURLs?
  2. Return a 400 overall, but point out the invalid PURLs in the error message?

This will help us in handling these cases easily.

SouravJohar avatar Sep 13 '23 17:09 SouravJohar