fix(api): make federation config validation non-fatal at startup
All checks were successful
ci/woodpecker/push/api Pipeline was successful
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:
@@ -99,10 +99,9 @@ export class FederationModule implements OnModuleInit {
|
|||||||
validateFederationConfig();
|
validateFederationConfig();
|
||||||
this.logger.log("Federation configuration validated successfully");
|
this.logger.log("Federation configuration validated successfully");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error(
|
this.logger.warn(
|
||||||
`Federation configuration validation failed: ${error instanceof Error ? error.message : String(error)}`
|
`Federation disabled: ${error instanceof Error ? error.message : String(error)}`
|
||||||
);
|
);
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user