diff --git a/session/session.go b/session/session.go index 6ef009a..3ecb1dd 100644 --- a/session/session.go +++ b/session/session.go @@ -45,7 +45,7 @@ func New(token string) (*Session, error) { // Create a gateway g, err := gateway.NewGateway(token) if err != nil { - err = errors.Wrap(err, "failed to connect to Gateway") + return nil, errors.Wrap(err, "failed to connect to Gateway") } return NewWithGateway(g), err