diff --git a/plugins/rapid7_insightidr/help.md b/plugins/rapid7_insightidr/help.md index fed76e0dd3..d9689df539 100644 --- a/plugins/rapid7_insightidr/help.md +++ b/plugins/rapid7_insightidr/help.md @@ -2025,7 +2025,7 @@ Example output: # Version History * 6.0.2 - Action: `Advanced Query On Log set` - Fixed error where statistical queries would always return 0.0 -* 6.0.1 - Action: `Advanced Query On Log` - Up the maximium events returned from 50 to 500 +* 6.0.1 - Action: `Advanced Query On Log` - Increase the maximum results returned from 50 to 500 * 6.0.0 - Action: `Advanced Query On Log Set` - Add new output type for statistical queries. * 5.1.2 - Action: `Advanced Query on Log Set` - Fix JSONDecoderError | Action: `Query` - Update spec and help.md to show it queries log IDs, not query IDs * 5.1.1 - Action: `List Investigations` - Now receiving size input | Actions: `Advanced Query On Log` & `Advanced Query On Log Set` - Acronym LQL has been updated to LEQL diff --git a/plugins/rapid7_insightidr/komand_rapid7_insightidr/actions/advanced_query_on_log_set/action.py b/plugins/rapid7_insightidr/komand_rapid7_insightidr/actions/advanced_query_on_log_set/action.py index c13262aebb..4be3ef7805 100755 --- a/plugins/rapid7_insightidr/komand_rapid7_insightidr/actions/advanced_query_on_log_set/action.py +++ b/plugins/rapid7_insightidr/komand_rapid7_insightidr/actions/advanced_query_on_log_set/action.py @@ -6,6 +6,7 @@ from komand_rapid7_insightidr.util.resource_helper import ResourceHelper from insightconnect_plugin_runtime.exceptions import PluginException from komand_rapid7_insightidr.util.parse_dates import parse_dates +from requests import HTTPError class AdvancedQueryOnLogSet(insightconnect_plugin_runtime.Action): @@ -181,11 +182,11 @@ def maybe_get_log_entries( stats_response = self.connection.session.get(stats_endpoint, params=params) try: stats_response.raise_for_status() - except Exception: + except HTTPError as error: raise PluginException( cause="Failed to get log sets from InsightIDR\n", assistance=f"Could not get statistical info from: {stats_endpoint}\n", - data=stats_response.text, + data=f"{stats_response.text}, {error}", ) potential_results = stats_response.json() else: