error: Error validating datasource db: the URL must start with the protocol mongo.

Error:
Invalid prisma.course.findMany() invocation:

error: Error validating datasource db: the URL must start with the protocol mongo.

for whatever reason connection code provided by mongodb does not work

original code:

mongodb+srv://user:pass@url/?retryWrites=true&w=majority&appName=Cluster

the fix is to add database name in the connection string:

mongodb+srv://user:pass@url/DataBaseName?retryWrites=true&w=majority&appName=Cluster

Β 

Β