You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stumbled upon a gotcha recently, where this does not behave as expected:
try {
await SimpleCache.getOrSet('key', async () => {
throw Error()
return {
value: 'value',
ttl: 60
}
});
} catch (e) {
// the exception inside the set callback will not be caught here
}
I understand that there's a lot going on under the hood with SimpleCache (request collapsing and all), but it'd be more convenient if you could catch exceptions from the "outside". At the very least, this behavior should be documented.
The text was updated successfully, but these errors were encountered:
Hello!
Stumbled upon a gotcha recently, where this does not behave as expected:
I understand that there's a lot going on under the hood with SimpleCache (request collapsing and all), but it'd be more convenient if you could catch exceptions from the "outside". At the very least, this behavior should be documented.
The text was updated successfully, but these errors were encountered: