fixed up logger error to make it better to handle in code
This commit is contained in:
parent
db66687f48
commit
d0bb4db042
18 changed files with 51 additions and 45 deletions
|
|
@ -362,7 +362,7 @@ export class QuestDBInfluxWriter {
|
|||
if (attempt <= options.retryAttempts) {
|
||||
await this.sleep(options.retryDelay * attempt); // Exponential backoff
|
||||
} else {
|
||||
throw new Error(`Failed to write to QuestDB after ${options.retryAttempts} attempts: ${error}`);
|
||||
throw new Error(`Failed to write to QuestDB after ${options.retryAttempts} attempts: $error`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -380,7 +380,7 @@ export class QuestDBInfluxWriter {
|
|||
try {
|
||||
await this.flush(options);
|
||||
} catch (error) {
|
||||
this.logger.error('Scheduled flush failed', { error });
|
||||
this.logger.error('Scheduled flush failed', error);
|
||||
}
|
||||
}, options.flushInterval);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue