Closed jeffrymorris closed 3 years ago
To further comment on this, as of now the GetAsync()
extension is not handling the DocumentNotFoundException
from the Couchbase 3.x SDK and since unhandled, the session middleware is failing to create the cookie needed to lookup the session data. Adding a try...catch(DocumentNotFoundException) { return default; }
around the call to the SDK fixed this issue.
Per documentation (https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.caching.distributed.idistributedcache.getasync?view=dotnet-plat-ext-3.1#Microsoft_Extensions_Caching_Distributed_IDistributedCache_GetAsync_System_String_System_Threading_CancellationToken_), GetAsync should return null if DOC_NOT_FOUND returned by couchbase.