diff --git a/unixcreds_linux.go b/unixcreds_linux.go index 11bc9f9a7..c82c9f9d4 100644 --- a/unixcreds_linux.go +++ b/unixcreds_linux.go @@ -50,7 +50,7 @@ func (fn UnixCredentialsFunc) Handshake(_ context.Context, conn net.Conn) (net.C } if ucredErr != nil { - return nil, nil, fmt.Errorf("ttrpc.UnixCredentialsFunc: failed to retrieve socket peer credentials: %w", err) + return nil, nil, fmt.Errorf("ttrpc.UnixCredentialsFunc: failed to retrieve socket peer credentials: %w", ucredErr) } if err := fn(ucred); err != nil {