exceptionfactory commented on code in PR #10189:
URL: https://github.com/apache/nifi/pull/10189#discussion_r2267672580
##########
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:
It would be helpful to provide a comment referencing the description for
these error codes.
--
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]