fix(api): make federation config validation non-fatal at startup
All checks were successful
ci/woodpecker/push/api Pipeline was successful

Federation is optional and should not prevent the app from starting
when DEFAULT_WORKSPACE_ID is not set. Changed from throwing (crash)
to logging a warning. The endpoint-level validation in the controller
still rejects requests when federation is unconfigured.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 01:08:09 -06:00
parent 8733a643bf
commit d2003a7b03

View File

@@ -99,10 +99,9 @@ export class FederationModule implements OnModuleInit {
validateFederationConfig();
this.logger.log("Federation configuration validated successfully");
} catch (error) {
this.logger.error(
`Federation configuration validation failed: ${error instanceof Error ? error.message : String(error)}`
this.logger.warn(
`Federation disabled: ${error instanceof Error ? error.message : String(error)}`
);
throw error;
}
}
}