InfluxDB 2.0 JavaScript client
Home > @influxdata/influxdb-client > WriteRetryOptions > writeFailed
WriteFailed is called to inform about write errors.
Signature:
writeFailed(this: WriteApi, error: Error, lines: Array<string>, attempt: number, expires: number): Promise<void> | void;
Parameter | Type | Description |
---|---|---|
this | WriteApi | the instance of the API that failed |
error | Error | write error |
lines | Array<string> | failed lines |
attempt | number | count of already failed attempts to write the lines (1 … maxRetries+1) |
expires | number | expiration time for the lines to be retried in millis since epoch |
Returns:
Promise<void> | void
a Promise to force the API to use it as a result of the flush operation, void/undefined to continue with default retry mechanism