insightconnect-plugin-runtime 6.3.1__py3-none-any.whl → 6.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- insightconnect_plugin_runtime/helper.py +5 -2
- {insightconnect_plugin_runtime-6.3.1.dist-info → insightconnect_plugin_runtime-6.3.2.dist-info}/METADATA +2 -1
- {insightconnect_plugin_runtime-6.3.1.dist-info → insightconnect_plugin_runtime-6.3.2.dist-info}/RECORD +5 -5
- {insightconnect_plugin_runtime-6.3.1.dist-info → insightconnect_plugin_runtime-6.3.2.dist-info}/WHEEL +0 -0
- {insightconnect_plugin_runtime-6.3.1.dist-info → insightconnect_plugin_runtime-6.3.2.dist-info}/top_level.txt +0 -0
|
@@ -262,7 +262,10 @@ def response_handler(
|
|
|
262
262
|
) -> None:
|
|
263
263
|
"""
|
|
264
264
|
Check response status codes and return a generic PluginException preset if a HTTPError is raised.
|
|
265
|
-
|
|
265
|
+
Exception cause, assistance, and data can be overwritten by supplied parameters.
|
|
266
|
+
|
|
267
|
+
When we receive a common status code that we typically handle in the plugin, we raise an APIException
|
|
268
|
+
so that the status_code attribute can be easily accessed and raised further up the chain.
|
|
266
269
|
|
|
267
270
|
:param response: Response object whose status should be checked.
|
|
268
271
|
:type Response:
|
|
@@ -304,7 +307,7 @@ def response_handler(
|
|
|
304
307
|
if hasattr(exception, "data") and data is not None:
|
|
305
308
|
exception.data = data
|
|
306
309
|
elif status_code_preset:
|
|
307
|
-
exception =
|
|
310
|
+
exception = APIException(preset=status_code_preset, status_code=status_code)
|
|
308
311
|
exception.data = data
|
|
309
312
|
|
|
310
313
|
raise exception
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: insightconnect-plugin-runtime
|
|
3
|
-
Version: 6.3.
|
|
3
|
+
Version: 6.3.2
|
|
4
4
|
Summary: InsightConnect Plugin Runtime
|
|
5
5
|
Home-page: https://github.com/rapid7/komand-plugin-sdk-python
|
|
6
6
|
Author: Rapid7 Integrations Alliance
|
|
@@ -224,6 +224,7 @@ contributed. Black is installed as a test dependency and the hook can be initial
|
|
|
224
224
|
after cloning this repository.
|
|
225
225
|
|
|
226
226
|
## Changelog
|
|
227
|
+
* 6.3.2 - Raise `APIException` from within the `response_handler` to easily access the status code within the plugin
|
|
227
228
|
* 6.3.1 - Improved filtering for `custom_config` parameters for plugin tasks
|
|
228
229
|
* 6.3.0 - Add Tracing Instrumentation
|
|
229
230
|
* 6.2.6 - Remove setuptools after installation
|
|
@@ -4,7 +4,7 @@ insightconnect_plugin_runtime/cli.py,sha256=Pb-Janu-XfRlSXxPHh30OIquljWptrhhS51C
|
|
|
4
4
|
insightconnect_plugin_runtime/connection.py,sha256=4bHHV2B0UFGsAtvLu1fiYQRwx7fissUakHPUyjLQO0E,2340
|
|
5
5
|
insightconnect_plugin_runtime/dispatcher.py,sha256=ru7njnyyWE1-oD-VbZJ-Z8tELwvDf69rM7Iezs4rbnw,1774
|
|
6
6
|
insightconnect_plugin_runtime/exceptions.py,sha256=Pvcdkx81o6qC2qU661x-DzNjuIMP82x52nPMSEqEo4s,8491
|
|
7
|
-
insightconnect_plugin_runtime/helper.py,sha256=
|
|
7
|
+
insightconnect_plugin_runtime/helper.py,sha256=xGiskPd4vHr_k7BNEb3_7gPxm8sB85A7_5N31S-0RE4,33994
|
|
8
8
|
insightconnect_plugin_runtime/metrics.py,sha256=hf_Aoufip_s4k4o8Gtzz90ymZthkaT2e5sXh5B4LcF0,3186
|
|
9
9
|
insightconnect_plugin_runtime/plugin.py,sha256=Yf4LNczykDVc31F9G8uuJ9gxEsgmxmAr0n4pcZzichM,26393
|
|
10
10
|
insightconnect_plugin_runtime/schema.py,sha256=6MVw5hqGATU1VLgwfOWfPsP3hy1OnsugCTsgX8sknes,521
|
|
@@ -79,7 +79,7 @@ tests/unit/test_server_spec.py,sha256=je97BaktgK0Fiz3AwFPkcmHzYtOJJNqJV_Fw5hrvqX
|
|
|
79
79
|
tests/unit/test_trigger.py,sha256=E53mAUoVyponWu_4IQZ0IC1gQ9lakBnTn_9vKN2IZfg,1692
|
|
80
80
|
tests/unit/test_variables.py,sha256=OUEOqGYZA3Nd5oKk5GVY3hcrWKHpZpxysBJcO_v5gzs,291
|
|
81
81
|
tests/unit/utils.py,sha256=hcY0A2H_DMgCDXUTvDtCXMdMvRjLQgTaGcTpATb8YG0,2236
|
|
82
|
-
insightconnect_plugin_runtime-6.3.
|
|
83
|
-
insightconnect_plugin_runtime-6.3.
|
|
84
|
-
insightconnect_plugin_runtime-6.3.
|
|
85
|
-
insightconnect_plugin_runtime-6.3.
|
|
82
|
+
insightconnect_plugin_runtime-6.3.2.dist-info/METADATA,sha256=vgKGS09fSB4nQCCckH633xSzDf4UO6Waaae_XHnVivE,16419
|
|
83
|
+
insightconnect_plugin_runtime-6.3.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
84
|
+
insightconnect_plugin_runtime-6.3.2.dist-info/top_level.txt,sha256=AJtyJOpiFzHxsbHUICTcUKXyrGQ3tZxhrEHsPjJBvEA,36
|
|
85
|
+
insightconnect_plugin_runtime-6.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|