Skip to content

Commit

Permalink
show friendly test connection error
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Dec 12, 2024
1 parent 2d40411 commit 214ec28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/connections/sql-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ export abstract class SqlConnection extends Connection {
await this.disconnect();
return { error: error ? error.message : undefined };
} catch (error) {
if (error instanceof Error) {
return { error: error.message };
}
return { error: 'Unexpected error' };
}
}
Expand Down

0 comments on commit 214ec28

Please sign in to comment.