mrtom
02/03/2022, 9:10 PM<mongodb://user:password@shard-1.mongodb.net:27017/database?ssl=true&replicaSet=shard-1&authSource=admin&retryWrites=true>
Everything works fine.
But if I use multiple shards, like this:
<mongodb://user:password@shard-1.mongodb.net:27017>,<http://shard-2.mongodb.net:27017,shard-3.mongodb.net:27017/database?ssl=true&replicaSet=shard-0&authSource=admin&retryWrites=true|shard-2.mongodb.net:27017,shard-3.mongodb.net:27017/database?ssl=true&replicaSet=shard-0&authSource=admin&retryWrites=true>
I get the following error:
Error: The provided database string is invalid. Unable to parse URL. in database URL. Please refer to the documentation in <https://www.prisma.io/docs/reference/database-reference/connection-urls> for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters.
I can make the error go away on startup if I percentage encode the host section of the URL (which shouldn’t be necessary!), but then it blows up when I try and run a query.
Using Prisma Client 3.9.1.
Does anyone have any suggestions? Thanks 🙂Joël
mrtom
02/07/2022, 8:00 PMmrtom
02/07/2022, 8:48 PMMarcus
02/09/2022, 7:30 AMJoël