bejancsaba commented on code in PR #6344:
URL: https://github.com/apache/nifi/pull/6344#discussion_r972367769


##########
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/bigquery/PutBigQuery.java:
##########
@@ -382,12 +368,11 @@ private WriteStream createWriteStream() {
     }
 
     protected BigQueryWriteClient createWriteClient(GoogleCredentials 
credentials) {
-        BigQueryWriteClient client = null;
+        BigQueryWriteClient client;
         try {
             client = 
BigQueryWriteClient.create(BigQueryWriteSettings.newBuilder().setCredentialsProvider(FixedCredentialsProvider.create(credentials)).build());
-        } catch (IOException e) {
-            getLogger().error("Failed to create Big Query Write Client for 
writing due to {}", new Object[] {e});
-            setupException.set(e);
+        } catch (Exception e) {
+            throw new ProcessException("Failed to create Big Query Write 
Client for writing due to", e);

Review Comment:
   Unfortunately I was not able to find a better (NiFi defined) one. There is a 
processor called ProcessorInstantiationException but that is defined on the 
controller package and is a checked one not Runtime so doesn't really fit this 
use case. Other than that I haven't seen anything that would be better.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to