Skip to content

Commit 13a3836

Browse files
log when error during initialization
Signed-off-by: Thomas Poignant <[email protected]>
1 parent 27c926e commit 13a3836

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

libs/providers/go-feature-flag/src/lib/go-feature-flag-provider.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ export class GoFeatureFlagProvider implements Provider, Tracking {
105105
* Start the provider and initialize the event publisher.
106106
*/
107107
async initialize(): Promise<void> {
108-
this.evaluator && (await this.evaluator.initialize());
109-
this.eventPublisher && (await this.eventPublisher.start());
108+
try {
109+
this.evaluator && (await this.evaluator.initialize());
110+
this.eventPublisher && (await this.eventPublisher.start());
111+
} catch (error) {
112+
this.logger?.error('Failed to initialize the provider', error);
113+
throw error;
114+
}
110115
}
111116

112117
/**

0 commit comments

Comments
 (0)