Merge pull request #174 from ssb-ngi-pointer/fix-leaky-connect-error

don't leak internal details to callers
This commit is contained in:
Henry 2021-04-21 11:54:22 +02:00 committed by GitHub
commit 4c875eecd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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