Skip to content

Commit 3276a27

Browse files
feedback
1 parent 7073582 commit 3276a27

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

packages/backend/src/connectionManager.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,18 @@ export class ConnectionManager implements IConnectionManager {
295295
// After a connection has synced, we need to re-sync the org's search contexts as
296296
// there may be new repos that match the search context's include/exclude patterns.
297297
if (env.CONFIG_PATH) {
298-
const config = await loadConfig(env.CONFIG_PATH);
298+
try {
299+
const config = await loadConfig(env.CONFIG_PATH);
299300

300-
await syncSearchContexts({
301-
db: this.db,
302-
orgId,
303-
contexts: config.contexts,
304-
});
301+
await syncSearchContexts({
302+
db: this.db,
303+
orgId,
304+
contexts: config.contexts,
305+
});
306+
} catch (err) {
307+
this.logger.error(`Failed to sync search contexts for connection ${connectionId}: ${err}`);
308+
Sentry.captureException(err);
309+
}
305310
}
306311

307312

packages/shared/src/env.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ export const env = createEnv({
1010
},
1111
runtimeEnv: process.env,
1212
emptyStringAsUndefined: true,
13-
// @note: todo
14-
skipValidation: true,
13+
skipValidation: process.env.SKIP_ENV_VALIDATION === "1",
1514
});

0 commit comments

Comments
 (0)