Skip to content

AbstractWriteClient throwable not published as WriteErrorEvent #291

@jsimomaa

Description

@jsimomaa

AbstractWriteClient lines 179-184:

                .subscribe(responseNotification -> {

                    if (responseNotification.isOnError()) {
                        publish(new WriteErrorEvent(toInfluxException(responseNotification.getError())));
                    }
                }, throwable -> new WriteErrorEvent(toInfluxException(throwable)));

The latter WriteErrorEvent on line 184 never gets published.

Shouldn't the above code be:

                .subscribe(responseNotification -> {

                    if (responseNotification.isOnError()) {
                        publish(new WriteErrorEvent(toInfluxException(responseNotification.getError())));
                    }
                }, throwable -> publish(new WriteErrorEvent(toInfluxException(throwable))));

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Create new WriteApi
  2. Write some points
  3. Wait for the throwable to trigger for some reason

Expected behavior:
A new WriteErrorEvent would be published so that event handlers can handle it

Actual behavior:
The throwable never gets published as WriteErrorEvent

Specifications:

  • Client Version: 4.0.0
  • InfluxDB Version: 2.1
  • JDK Version: 8
  • Platform:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions