Fix types
This commit is contained in:
parent
b3b962534f
commit
062127b1f1
|
@ -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,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue