From 2b49850a5fefc83b31946c28c3f19873eaa20cf0 Mon Sep 17 00:00:00 2001 From: Lost Date: Fri, 1 Mar 2024 13:04:22 +0200 Subject: [PATCH] add error message when datasource cannot be fetched --- crates/lib/src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lib/src/client.rs b/crates/lib/src/client.rs index 3f34f76f..11074e83 100644 --- a/crates/lib/src/client.rs +++ b/crates/lib/src/client.rs @@ -174,7 +174,7 @@ impl PrismaClientInternals { Ok(url) => Some(url), Err(_) => source.load_shadow_database_url()?, } - .unwrap(); + .expect("Datasource could not be fetched, please check your schema.prisma file or your environment variables"); match url.starts_with("file:") { true => {