prisma: Weird error message on `db push` with invalid connection string: Connection string redacted, weird grammar
Bug description
With this schema:
generator client {
provider = "prisma-client-js"
previewFeatures = ["jsonProtocol"]
}
datasource db {
provider = "sqlite"
url = "./dev.db"
}
model Answer {
answerId Int @id @default(autoincrement())
cardId Int
known Boolean @default(false)
mastered Boolean @default(false)
}
and db push
you get:
PS C:\Users\Jan\Documents\throwaway\14757> npx prisma@5.0.0 db push
Prisma schema loaded from schema.prisma
Datasource "db": SQLite database
Error: P1013: The provided database string is invalid. `<REDACTED>` is not a known connection URL scheme. Prisma cannot determine the connector. 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.
Note the two problems:
- The error message tries to spell out the connection string, but it is replaced by
<REDACTED>
. If we are uncomfortable printing the connection string, we should just adapt the error message. Prisma cannot determine the connector. in database URL.
Prisma Version
5.0.0
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19 (6 by maintainers)
@quest-bot reward @onichandame
The bug issue was closed via a pull request, and then a bot of the bounty program we were experimenting with at the time posted a bunch of comments.
@quest-bot embark