sometimes requests are sent while the server is disconnected this leads to errors like:
Error: Unable to execute request: not connected to a Kuzzle server.
Discarded request: ...
Or whats the best practice to handle that kind of situations ?
Currently i just test if my local flag isConnected is set to true or false before sending but i cannot loop forever waiting for kuzzle to be back online. Edit after seeing this doc (offlineMode and autoQueue) : https://docs.kuzzle.io/sdk/js/7/core-classes/kuzzle/constructor/#arguments But after using ofllineMode and autoQueue, when the kuzzle is back online i get :
error: [KuzzleError: Insufficient permissions to execute this action.
at WebSocketProtocol.query
It seems the deQueue is happening before the jwt token (i'am using apikey) is set. Any advice please ?