Skip to content

Commit af485e8

Browse files
committed
feat: surface warehouse connection status detail in the frontend
1 parent ae437f2 commit af485e8

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

frontend/common/types/responses.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,7 @@ export type WarehouseConnection = {
12941294
id: number
12951295
warehouse_type: WarehouseType
12961296
status: WarehouseConnectionStatus
1297+
status_detail: string | null
12971298
name: string
12981299
config: SnowflakeConfig | ClickHouseConfig | Record<string, never>
12991300
created_at: string

frontend/web/components/pages/environment-settings/tabs/warehouse-tab/WarehouseConnectionCard.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ const WarehouseConnectionCard: FC<WarehouseConnectionCardProps> = ({
8282
}
8383
place='top'
8484
>
85-
{STATUS_LABEL[connection.status]}
85+
{connection.status === 'errored' && connection.status_detail
86+
? `${STATUS_LABEL[connection.status]}: ${
87+
connection.status_detail
88+
}`
89+
: STATUS_LABEL[connection.status]}
8690
</Tooltip>
8791
</div>
8892
{typeLabel && (

frontend/web/components/pages/environment-settings/tabs/warehouse-tab/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ const WarehouseTab: FC<WarehouseTabProps> = ({ environmentId }) => {
163163
if (result.status === 'connected') {
164164
toast('Connection verified')
165165
} else {
166-
toast('Connection failed — check your credentials', 'danger')
166+
toast(
167+
result.status_detail ||
168+
'Connection failed — check your credentials',
169+
'danger',
170+
)
167171
}
168172
})
169173
.catch(() => toast('Failed to test connection', 'danger'))

0 commit comments

Comments
 (0)