1
0
Fork 0
mirror of synced 2024-07-11 09:15:48 +12:00

Fix types

This commit is contained in:
Adria Navarro 2023-05-16 11:48:40 +02:00
parent b3b962534f
commit 062127b1f1

View file

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