Custom API timeout using the `Promise.race()`