don't leak internal details to callers

fixes #154
This commit is contained in:
Henry 2021-04-21 08:40:31 +02:00
parent c28a3a59ef
commit f68bd7d46f
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ func (h *Handler) connect(ctx context.Context, req *muxrpc.Request, peerSrc *mux
edp, has := h.state.Has(arg.Target)
if !has {
return fmt.Errorf("no such endpoint")
return fmt.Errorf("could not connect to:%s", arg.Target.Ref())
}
// call connect on them
@ -63,7 +63,7 @@ func (h *Handler) connect(ctx context.Context, req *muxrpc.Request, peerSrc *mux
targetSrc, targetSnk, err := edp.Duplex(ctx, muxrpc.TypeBinary, muxrpc.Method{"tunnel", "connect"}, argWorigin)
if err != nil {
return fmt.Errorf("failed to init connect call with target: %w", err)
return fmt.Errorf("could not connect to:%s", arg.Target.Ref())
}
// pipe data between caller and target