Skip to content

Conversation

addaleax
Copy link
Collaborator

This was brought up as a nice way of erroring early in the driver sync
meeting today.



This was brought up as a nice way of erroring early in the driver sync
meeting today.
@mmarcon
Copy link
Member

mmarcon commented Apr 23, 2021

This is awesome!

Can we (and should we) intercept this error message and customize it to make it more actionable for mongosh users?

MongoError: The apiVersion parameter is required, please configure your MongoClient's API version

It'd be nice if we could say something like:

MongoError: The apiVersion parameter is required, please run mongosh with the --apiVersion parameter.

I do see that we get the same error message also for Mongo() and connect(). Maybe we can come up with some copy that works in both cases. I believe that configure your MongoClient is confusing because MongoClient is not a thing for a mongosh user.

@addaleax
Copy link
Collaborator Author

@mmarcon Good question. I know that previously, we said that we’re not in the business of rewriting driver error messages, but I see how that makes sense here. We can definitely re-write these errors if we want to.

@addaleax addaleax merged commit 0ede48a into master Apr 23, 2021
@addaleax addaleax deleted the 705-dev branch April 23, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants