diff --git a/httpconnection.go b/httpconnection.go index 6b480399..18a48592 100644 --- a/httpconnection.go +++ b/httpconnection.go @@ -43,7 +43,9 @@ func NewHTTPConnection(ctx context.Context, address string, options ...func(*htt for _, option := range options { if option != nil { - option(httpConn) + if err := option(httpConn); err != nil { + return nil, err + } } }