Problem
NatsCache.TryGetAsync(string, IBufferWriter<byte>, …) catches all exceptions and returns false with no logging (src/NatsDistributedCache/NatsCache.cs). A NATS connectivity error is then indistinguishable from a normal cache miss and leaves no diagnostic trail.
catch
{
// Ignore failures here; they will surface later
}
Proposal
Log the swallowed exception at debug/trace (reusing the existing Exception event id) before returning false. Keep returning false so the IBufferDistributedCache contract is preserved.
Acceptance criteria
- A thrown error in the buffer read path produces a log entry.
- Return behavior is otherwise unchanged.
Good first issue.
Problem
NatsCache.TryGetAsync(string, IBufferWriter<byte>, …)catches all exceptions and returnsfalsewith no logging (src/NatsDistributedCache/NatsCache.cs). A NATS connectivity error is then indistinguishable from a normal cache miss and leaves no diagnostic trail.Proposal
Log the swallowed exception at debug/trace (reusing the existing
Exceptionevent id) before returningfalse. Keep returningfalseso theIBufferDistributedCachecontract is preserved.Acceptance criteria
Good first issue.