recombee / js-api-client

JavaScript client for easy use of the Recombee recommendation API from frontend
23 stars 11 forks source link

Recombee Timeout #21

Closed psdev0 closed 5 months ago

psdev0 commented 5 months ago

I've noticed that there's a property for setting client timeout to fix timeout errors like this (copied from an older issue):

var r = new recombee.AddDetailView(userId, itemId);
r.timeout = 10000; // 10 seconds

This one is being applied to a new recombee instance which I am not wrong about, I have to use it at multiple places where I am using Recombee.

Is there any global place to define this timeout setting to set this only at one place?

vallpaper commented 5 months ago

Hi! Currently, the only way to set custom timeout is per request as in the example. But thanks for the suggestions, we may introduce another way in future releases.