Skip to content

Commit

Permalink
Merge pull request #12612 from ashanhr/master
Browse files Browse the repository at this point in the history
Improve Error Logging
  • Loading branch information
RakhithaRR authored Oct 5, 2024
2 parents 3da67c1 + aead2ee commit ec9973a
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14030,12 +14030,10 @@ public List<BlockConditionsDTO> getBlockConditions(String tenantDomain) throws A
try {
connection.rollback();
} catch (SQLException ex) {
throw new APIManagementException("Failed to rollback getting Block conditions.",
ExceptionCodes.BLOCK_CONDITION_RETRIEVE_FAILED);
handleException("Failed to rollback getting Block conditions.", ex);
}
}
throw new APIManagementException("Failed to retrieve all block conditions for the tenant " + tenantDomain,
ExceptionCodes.BLOCK_CONDITION_RETRIEVE_FAILED);
handleException("Failed to retrieve all block conditions for the tenant " + tenantDomain, e);
} finally {
APIMgtDBUtil.closeAllConnections(selectPreparedStatement, connection, resultSet);
}
Expand Down Expand Up @@ -14086,9 +14084,9 @@ public List<BlockConditionsDTO> getBlockConditionsByConditionTypeAndValue(String
blockConditionsDTOList.add(blockConditionsDTO);
}
} catch (SQLException e) {
throw new APIManagementException(
"Failed to get Block conditions by condition type: " + conditionType + " and condition value: "
+ conditionValue, ExceptionCodes.BLOCK_CONDITION_RETRIEVE_FAILED);
handleException(
"Failed to get Block conditions by condition type: " + conditionType + " and condition value: " + conditionValue,
e);
} finally {
APIMgtDBUtil.closeAllConnections(selectPreparedStatement, connection, resultSet);
}
Expand Down

0 comments on commit ec9973a

Please sign in to comment.