research-software-directory / RSD-as-a-service

This repo contains the new RSD-as-a-service implementation
https://research.software
27 stars 14 forks source link

OpenAlex scraper throws exception when no mentions are to be scraped #1317

Closed ewan-escience closed 1 month ago

ewan-escience commented 1 month ago

When the method OpenAlexConnector.mentionDataByOpenalexIds is called with an empty collection, a wrongly formatted request is still made to the OpenAlex API, resulting in an error response from OpenAlex and an exception later on. We should check for an empty collection and return early in that case with an empty return value. We should also do this for other methods in that class and other classes.