I see, maybe you should just check if res.body.length > 0 ? I don't understand the 10 number, sorry