Skip to content

Commit 3533e26

Browse files
committed
feat: add warnings about unknown integrations
1 parent addaa7d commit 3533e26

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/notebooks/deepnote/integrations/integrationDetector.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,20 @@ export class IntegrationDetector implements IIntegrationDetector {
5252

5353
logger.debug(`IntegrationDetector: Found integration: ${integrationId} (${projectIntegration.type})`);
5454

55-
// Check if the integration is configured
56-
const config = await this.integrationStorage.getIntegrationConfig(integrationId);
57-
5855
// Map the Deepnote integration type to our IntegrationType
5956
const integrationType = DEEPNOTE_TO_INTEGRATION_TYPE[projectIntegration.type];
6057

58+
// Skip unknown integration types
59+
if (!integrationType) {
60+
logger.warn(
61+
`IntegrationDetector: Unknown integration type '${projectIntegration.type}' for integration ID '${integrationId}'. Skipping.`
62+
);
63+
continue;
64+
}
65+
66+
// Check if the integration is configured
67+
const config = await this.integrationStorage.getIntegrationConfig(integrationId);
68+
6169
const status: IntegrationWithStatus = {
6270
config: config || null,
6371
status: config ? IntegrationStatus.Connected : IntegrationStatus.Disconnected,

0 commit comments

Comments
 (0)