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
Currently, instances of the stdlib errors trasnferred over the network are decoded into an object of the same type/value, but not the same instance. So reference comparisons with == with the stdlib instance fail.
This matters for e.g. context.Context.Err() which describes in its API doc that it returns the standrd errors unwrapped so it's legitimate for a caller to use ==.
We could address that by adding a special case in the leaf decoder, so that if a leaf is one of the known stdlib errors, we return the stdlib instance instead.
The text was updated successfully, but these errors were encountered:
Currently, instances of the stdlib errors trasnferred over the network are decoded into an object of the same type/value, but not the same instance. So reference comparisons with
==
with the stdlib instance fail.This matters for e.g.
context.Context.Err()
which describes in its API doc that it returns the standrd errors unwrapped so it's legitimate for a caller to use==
.We could address that by adding a special case in the leaf decoder, so that if a leaf is one of the known stdlib errors, we return the stdlib instance instead.
The text was updated successfully, but these errors were encountered: