My guess is that the query just failed because of a bad parameter. Maybe an invalidscan config id or job number, etc. If I were debugging this I'd start out by turning on the SQLprofiler and getting a trace. That should clue you into what the GetVulns API is failing on.
Normally I'd suggest opening a service request for something complicated like this but the SDK isn't offically supported. If you find a documentation issue though we can submit that into your development team to take a look at.
Have a great day.