fix(catalog-backend): fix stitcher error message and warn on unknown strategy mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2026-05-21 17:12:25 +02:00
parent b8731fc82b
commit 5e6af9b7f6
2 changed files with 5 additions and 1 deletions
@@ -80,7 +80,7 @@ export class DefaultStitcher {
async start() {
if (this.stopFunc) {
throw new Error('Processing engine is already started');
throw new Error('Stitcher is already started');
}
const { pollingInterval, stitchTimeout } = this.strategy;
@@ -42,6 +42,10 @@ export function stitchingStrategyFromConfig(
options?.logger?.warn(
"The 'immediate' stitching strategy mode has been removed and is no longer supported. Falling back to deferred stitching. Please remove the 'catalog.stitchingStrategy.mode' configuration key.",
);
} else if (strategyMode !== undefined && strategyMode !== 'deferred') {
options?.logger?.warn(
`Unknown stitching strategy mode '${strategyMode}', falling back to deferred stitching. Please remove or correct the 'catalog.stitchingStrategy.mode' configuration key.`,
);
}
const pollingIntervalKey = 'catalog.stitchingStrategy.pollingInterval';