You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
m, err:=mongo.Connect(context.Background(), options.Client().ApplyURI(uri))
iferr!=nil {
c.logger.Errorf("error connecting to mongoDB, err:%v", err)
return
}
The context should be passed on here, there is no way to set a timeout or cancellation on this.
The Connect() interface should accept a context and return an error.
To Reproduce
Steps to reproduce the behavior, if applicable:
The code is
The error is
Expected behavior
Right now it will sit there and try and connect to a mongodb instance forever. users should have the ability to set a timeout context and properly return errors, instead of just printing stuff with the logger.
Screenshots
If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
OS: [e.g. Linux]
gofr version [e.g. v1.5.0]
go version [e.g. 1.21]
More description
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
The context should be passed on here, there is no way to set a timeout or cancellation on this.
The Connect() interface should accept a context and return an error.
To Reproduce
Steps to reproduce the behavior, if applicable:
The code is
The error is
Expected behavior
Right now it will sit there and try and connect to a mongodb instance forever. users should have the ability to set a timeout context and properly return errors, instead of just printing stuff with the logger.
Screenshots
If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
More description
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: