Fix types

This commit is contained in:
Adria Navarro 2023-05-16 11:48:40 +02:00
parent b3b962534f
commit 062127b1f1
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import { import {
ConnectionInfo,
DatasourceFeature, DatasourceFeature,
Integration, Integration,
QueryType, QueryType,
@ -71,12 +72,15 @@ class SnowflakeIntegration {
this.client = new Snowflake(config) this.client = new Snowflake(config)
} }
async testConnection() { async testConnection(): Promise<ConnectionInfo> {
try { try {
await this.client.connect() await this.client.connect()
return true return { connected: true }
} catch (e: any) { } catch (e: any) {
return { error: e.message as string } return {
connected: false,
error: e.message as string,
}
} }
} }