Handle error edge cases
Signed-off-by: Damon Kaswell <damon.kaswell1@hp.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
6f42b641ab
commit
21f0ae79d6
@@ -118,7 +118,10 @@ export class IncrementalIngestionEngine implements IterationEngine {
|
||||
const backoffLength = currentBackoff.as('milliseconds');
|
||||
this.options.logger.error(error);
|
||||
|
||||
const truncatedError = (error as string).substring(0, 700);
|
||||
const truncatedError =
|
||||
typeof error === 'string'
|
||||
? error.substring(0, 700)
|
||||
: `${error}`;
|
||||
this.options.logger.error(
|
||||
`incremental-engine: Ingestion '${ingestionId}' threw an error during ingestion burst. Ingestion will backoff for ${currentBackoff.toHuman()} (${truncatedError})`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user