in src/main/java/com/amazonaws/secretsmanager/util/SQLExceptionUtils.java [18:28]
public static boolean unwrapAndCheckForCode(Throwable t, int errorCode) {
final List<Throwable> list = new ArrayList<>();
while (t != null && list.contains(t) == false) {
list.add(t);
if ( t instanceof SQLException && ((SQLException)t).getErrorCode() == errorCode ) {
return true;
}
t = t.getCause();
}
return false;
}