shubhrajain475 commented on code in PR #10189:
URL: https://github.com/apache/nifi/pull/10189#discussion_r2269013642
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutSQL.java:
##########
@@ -895,6 +900,22 @@ private FlowFile addErrorAttributesToFlowFile(final
ProcessSession session, Flow
return session.putAllAttributes(flowFile, attributes);
}
+
+ private boolean isDuplicateKeyException(SQLException e) {
+ if ("23000".equals(e.getSQLState())) {
+ return true;
+ }
+ int errorCode = e.getErrorCode();
+ if (errorCode == 1062 || errorCode == 23505) {
Review Comment:
Addressed requested changes — fixed indentation to be consistent (4 spaces)
and added comment referencing error codes 1062 and 23505.
--
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]