From e45fa09e0549f71ac9be3ddd6442555145ae64fa Mon Sep 17 00:00:00 2001 From: Alban Dumouilla Date: Thu, 12 Dec 2024 15:36:38 +0100 Subject: [PATCH] snake_case + make errors generic --- core/src/databases/remote_databases/get_remote_database.rs | 4 ++-- core/src/oauth/credential.rs | 2 +- types/src/oauth/lib.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/databases/remote_databases/get_remote_database.rs b/core/src/databases/remote_databases/get_remote_database.rs index 45069a302721..9dca1d73e06e 100644 --- a/core/src/databases/remote_databases/get_remote_database.rs +++ b/core/src/databases/remote_databases/get_remote_database.rs @@ -17,8 +17,8 @@ pub async fn get_remote_database( let db = SnowflakeRemoteDatabase::new(content)?; Ok(Box::new(db) as Box) } - CredentialProvider::Modjo => { - anyhow::bail!("Modjo is not a remote database provider") + _ => { + anyhow::bail!("{:?} is not a supported remote database provider", provider) } } } diff --git a/core/src/oauth/credential.rs b/core/src/oauth/credential.rs index 18034d36bbcc..06d9ffbdda67 100644 --- a/core/src/oauth/credential.rs +++ b/core/src/oauth/credential.rs @@ -109,7 +109,7 @@ impl Credential { vec!["account", "warehouse", "username", "password", "role"] } CredentialProvider::Modjo => { - vec!["apiKey"] + vec!["api_key"] } }; diff --git a/types/src/oauth/lib.ts b/types/src/oauth/lib.ts index 421135298436..44843409d492 100644 --- a/types/src/oauth/lib.ts +++ b/types/src/oauth/lib.ts @@ -75,7 +75,7 @@ export const SnowflakeCredentialsSchema = t.type({ export type SnowflakeCredentials = t.TypeOf; export const ApiKeyCredentialsSchema = t.type({ - apiKey: t.string, + api_key: t.string, }); export type ModjoCredentials = t.TypeOf;