insightconnect-plugin-runtime 5.5.5__tar.gz → 5.6.1__tar.gz

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.
Files changed (91) hide show
  1. {insightconnect_plugin_runtime-5.5.5/insightconnect_plugin_runtime.egg-info → insightconnect_plugin_runtime-5.6.1}/PKG-INFO +3 -1
  2. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/README.md +2 -0
  3. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/api/endpoints.py +5 -3
  4. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/exceptions.py +6 -0
  5. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/helper.py +2 -1
  6. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/plugin.py +1 -1
  7. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1/insightconnect_plugin_runtime.egg-info}/PKG-INFO +3 -1
  8. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/setup.py +1 -1
  9. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_exceptions.py +18 -1
  10. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_helpers.py +7 -1
  11. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/MANIFEST.in +0 -0
  12. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect-plugin-swagger.json +0 -0
  13. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/__init__.py +0 -0
  14. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/action.py +0 -0
  15. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/api/__init__.py +0 -0
  16. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/api/schemas.py +0 -0
  17. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/cli.py +0 -0
  18. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/clients/__init__.py +0 -0
  19. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/clients/aws_client.py +0 -0
  20. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/clients/oauth.py +0 -0
  21. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/connection.py +0 -0
  22. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/data/input_message_schema.json +0 -0
  23. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/data/output_message_schema.json +0 -0
  24. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/dispatcher.py +0 -0
  25. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/metrics.py +0 -0
  26. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/schema.py +0 -0
  27. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/server.py +0 -0
  28. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/step.py +0 -0
  29. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/task.py +0 -0
  30. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/trigger.py +0 -0
  31. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/util.py +0 -0
  32. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime/variables.py +0 -0
  33. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime.egg-info/SOURCES.txt +0 -0
  34. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime.egg-info/dependency_links.txt +0 -0
  35. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime.egg-info/requires.txt +0 -0
  36. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/insightconnect_plugin_runtime.egg-info/top_level.txt +0 -0
  37. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/setup.cfg +0 -0
  38. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/__init__.py +0 -0
  39. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/__init__.py +0 -0
  40. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/__init__.py +0 -0
  41. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/__init__.py +0 -0
  42. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/__init__.py +0 -0
  43. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/__init__.py +0 -0
  44. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/__init__.py +0 -0
  45. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/action.py +0 -0
  46. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/schema.py +0 -0
  47. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/__init__.py +0 -0
  48. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/action.py +0 -0
  49. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/schema.py +0 -0
  50. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/__init__.py +0 -0
  51. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/action.py +0 -0
  52. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/schema.py +0 -0
  53. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/__init__.py +0 -0
  54. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/connection.py +0 -0
  55. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/schema.py +0 -0
  56. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/__init__.py +0 -0
  57. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/__init__.py +0 -0
  58. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/schema.py +0 -0
  59. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/task.py +0 -0
  60. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/__init__.py +0 -0
  61. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/__init__.py +0 -0
  62. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/schema.py +0 -0
  63. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/trigger.py +0 -0
  64. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/__init__.py +0 -0
  65. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/schema.py +0 -0
  66. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/trigger.py +0 -0
  67. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/__init__.py +0 -0
  68. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/schema.py +0 -0
  69. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/trigger.py +0 -0
  70. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/komand_hello_world/util/__init__.py +0 -0
  71. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/hello_world/setup.py +0 -0
  72. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/__init__.py +0 -0
  73. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/conftest.py +0 -0
  74. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/test_cli.py +0 -0
  75. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/test_hello_world.py +0 -0
  76. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/plugin/hello_world/tests/test_server.py +0 -0
  77. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/__init__.py +0 -0
  78. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_action.py +0 -0
  79. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_api.py +0 -0
  80. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_aws_action.py +0 -0
  81. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_custom_encoder.py +0 -0
  82. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_endpoints.py +0 -0
  83. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_metrics.py +0 -0
  84. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_oauth.py +0 -0
  85. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_plugin.py +0 -0
  86. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_schema.py +0 -0
  87. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_server_cloud_plugins.py +0 -0
  88. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_server_spec.py +0 -0
  89. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_trigger.py +0 -0
  90. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/test_variables.py +0 -0
  91. {insightconnect_plugin_runtime-5.5.5 → insightconnect_plugin_runtime-5.6.1}/tests/unit/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: insightconnect-plugin-runtime
3
- Version: 5.5.5
3
+ Version: 5.6.1
4
4
  Summary: InsightConnect Plugin Runtime
5
5
  Home-page: https://github.com/rapid7/komand-plugin-sdk-python
6
6
  Author: Rapid7 Integrations Alliance
@@ -211,6 +211,8 @@ contributed. Black is installed as a test dependency and the hook can be initial
211
211
  after cloning this repository.
212
212
 
213
213
  ## Changelog
214
+ * 5.6.1 - Making sure all paths that can call the task connection test endpoints return a 400 error if the test fails
215
+ * 5.6.0 - Add APIException class for error handling | Fix error in response_handler where data of type Response was not correctly being returned
214
216
  * 5.5.5 - Address bug with typing for type `Dict` in Python 3.8
215
217
  * 5.5.4 - Support pagination parameters within AWS client.
216
218
  * 5.5.3 - Adding in a new endpoint that can be called to run a task connection test
@@ -182,6 +182,8 @@ contributed. Black is installed as a test dependency and the hook can be initial
182
182
  after cloning this repository.
183
183
 
184
184
  ## Changelog
185
+ * 5.6.1 - Making sure all paths that can call the task connection test endpoints return a 400 error if the test fails
186
+ * 5.6.0 - Add APIException class for error handling | Fix error in response_handler where data of type Response was not correctly being returned
185
187
  * 5.5.5 - Address bug with typing for type `Dict` in Python 3.8
186
188
  * 5.5.4 - Support pagination parameters within AWS client.
187
189
  * 5.5.3 - Adding in a new endpoint that can be called to run a task connection test
@@ -283,7 +283,7 @@ class Endpoints:
283
283
  self.logger.debug("Request input: %s", input_message)
284
284
  Endpoints.validate_action_trigger_task_empty_input(input_message)
285
285
  Endpoints.validate_action_trigger_task_name(input_message, name, "task")
286
- output = self.run_action_trigger_task(input_message, True)
286
+ output = self.run_action_trigger_task(input_message, True, connection_test_type="test_task")
287
287
  return output
288
288
 
289
289
  @v1.route("/api")
@@ -821,13 +821,13 @@ class Endpoints:
821
821
 
822
822
  return input_data
823
823
 
824
- def run_action_trigger_task(self, input_message, test=False):
824
+ def run_action_trigger_task(self, input_message, test=False, connection_test_type="test"):
825
825
  connection = input_message.get("body", {}).get("connection", {})
826
826
  status_code = 200
827
827
  output = None
828
828
  try:
829
829
  output = self.plugin.handle_step(
830
- input_message, is_debug=self.debug, is_test=test
830
+ input_message, is_debug=self.debug, is_test=test, connection_test_type=connection_test_type
831
831
  )
832
832
  except LoggedException as error:
833
833
  wrapped_exception = error.ex
@@ -841,6 +841,8 @@ class Endpoints:
841
841
  and wrapped_exception.preset is PluginException.Preset.BAD_REQUEST
842
842
  ):
843
843
  status_code = 400
844
+ elif isinstance(wrapped_exception, (ConnectionTestException, ClientException)):
845
+ status_code = 400
844
846
  elif isinstance(wrapped_exception, ServerException):
845
847
  # I'm unsure about this
846
848
  status_code = 500
@@ -207,3 +207,9 @@ class PluginException(ConnectionTestException):
207
207
  return "An error occurred during plugin execution!\n\n{cause} {assistance}".format(
208
208
  cause=self.cause, assistance=self.assistance
209
209
  )
210
+
211
+
212
+ class APIException(PluginException):
213
+ def __init__(self, cause=None, assistance=None, data=None, preset=None, status_code=None):
214
+ super().__init__(cause, assistance, data, preset)
215
+ self.status_code = status_code
@@ -243,7 +243,8 @@ def response_handler(
243
243
  if hasattr(exception, "data") and data is not None:
244
244
  exception.data = data
245
245
  elif status_code_preset:
246
- exception = PluginException(preset=status_code_preset, data=data)
246
+ exception = PluginException(preset=status_code_preset)
247
+ exception.data = data
247
248
 
248
249
  raise exception
249
250
 
@@ -627,7 +627,7 @@ class Plugin(object):
627
627
  # Check if connection test func available. If so - use it (preferred). Else fallback to action/trigger test
628
628
  if hasattr(step.connection, "test"):
629
629
  if hasattr(step.connection, "test") and connection_test_type == "test_task":
630
- func = step.connection.task_test
630
+ func = step.connection.test_task
631
631
  else:
632
632
  func = step.connection.test
633
633
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: insightconnect-plugin-runtime
3
- Version: 5.5.5
3
+ Version: 5.6.1
4
4
  Summary: InsightConnect Plugin Runtime
5
5
  Home-page: https://github.com/rapid7/komand-plugin-sdk-python
6
6
  Author: Rapid7 Integrations Alliance
@@ -211,6 +211,8 @@ contributed. Black is installed as a test dependency and the hook can be initial
211
211
  after cloning this repository.
212
212
 
213
213
  ## Changelog
214
+ * 5.6.1 - Making sure all paths that can call the task connection test endpoints return a 400 error if the test fails
215
+ * 5.6.0 - Add APIException class for error handling | Fix error in response_handler where data of type Response was not correctly being returned
214
216
  * 5.5.5 - Address bug with typing for type `Dict` in Python 3.8
215
217
  * 5.5.4 - Support pagination parameters within AWS client.
216
218
  * 5.5.3 - Adding in a new endpoint that can be called to run a task connection test
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="insightconnect-plugin-runtime",
8
- version="5.5.5",
8
+ version="5.6.1",
9
9
  description="InsightConnect Plugin Runtime",
10
10
  long_description=long_description,
11
11
  long_description_content_type="text/markdown",
@@ -1,4 +1,4 @@
1
- from insightconnect_plugin_runtime.exceptions import PluginException
1
+ from insightconnect_plugin_runtime.exceptions import PluginException, APIException
2
2
  from unittest import TestCase
3
3
 
4
4
 
@@ -85,3 +85,20 @@ class TestExceptions(TestCase):
85
85
  raise (PluginException(preset=test_data.get("preset")))
86
86
  assert context.exception.cause == test_data.get("expected_cause")
87
87
  assert context.exception.assistance == test_data.get("expected_assistance")
88
+
89
+ def test_api_exception(self):
90
+ with self.assertRaises(APIException) as context:
91
+ raise (
92
+ APIException(
93
+ preset=PluginException.Preset.NOT_FOUND,
94
+ status_code=404,
95
+ data="example",
96
+ )
97
+ )
98
+ assert context.exception.cause == "Invalid or unreachable endpoint provided."
99
+ assert (
100
+ context.exception.assistance
101
+ == "Verify the URLs or endpoints in your configuration are correct."
102
+ )
103
+ assert context.exception.data == "example"
104
+ assert context.exception.status_code == 404
@@ -439,7 +439,11 @@ class TestRequestsHelpers(TestCase):
439
439
  ):
440
440
  request = requests.Request(method=method, url=url, json=None)
441
441
  with self.assertRaises(PluginException) as error:
442
- helper.make_request(_request=request, exception_custom_configs=exp_config)
442
+ helper.make_request(
443
+ _request=request,
444
+ exception_custom_configs=exp_config,
445
+ exception_data_location=ResponseExceptionData.RESPONSE,
446
+ )
443
447
  assert (isinstance(error, exception_type), True)
444
448
  if test_name == "custom404":
445
449
  self.assertEqual(
@@ -450,6 +454,8 @@ class TestRequestsHelpers(TestCase):
450
454
  error.exception.assistance,
451
455
  "CustomAssistance",
452
456
  )
457
+ self.assertEqual(error.exception.data.text, "example")
458
+ self.assertEqual(error.exception.data.status_code, 404)
453
459
 
454
460
  @parameterized.expand(
455
461
  [