Context
I have a project which uses influxdb-client-java version 7.0.0. I am writing points using the WriteApi which starts a background thread to send data to the influxdb instance.
My Problem
I want to catch the UnauthorizedException to act upon it.
Question
Can I register an exception handler somewhere or how could I achive that?
I have searched online but could not find any useful documentation.
I found a way how to achieve it. The
WriteApihas alistenEventsmethod which you can use for it. An example: