Skip to content

Return a user-facing error for database URL parsing errors. #1241

@tomhoule

Description

@tomhoule

We currently return less-than-readable error messages when parsing a database URL fails, like

invalid port number in `mysql://root:password-with-#@localhost:3306/mydb`

Ideally, we would have a docs page to point to on the right syntax for database URLs.

This error should have at least three pieces of information:

  • The url that failed to parse
  • More information on what failed (the url crate error)
  • What is expected on that particular database, and how to address it. Maybe links to docs?

Related: prisma/prisma#3921

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions