Skip to content

Commit

Permalink
Remove original error handling, move it to api.py (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcnally-r7 authored and igorski-r7 committed Sep 5, 2024
1 parent 23025e7 commit a693482
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions plugins/okta/komand_okta/tasks/monitor_logs/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ def run(self, params={}, state={}, custom_config={}): # pylint: disable=unused-
except ApiException as error:
self.logger.info(f"An API Exception has been raised. Status code: {error.status_code}. Error: {error}")
return [], state, False, error.status_code, error
except ConnectionError as error:
self.logger.info(
"The connection has failed, perhaps due to an invalid subdomain.\nPlease ensure the subdomain conforms to these potential formats: \n./*.okta.com ./*.oktapreview.com ./*.okta-emea.com\n"
)
return [], state, False, 401, PluginException(preset=PluginException.Preset.NOT_FOUND, data=error)
except Exception as error:
self.logger.info(f"An Exception has been raised. Error: {error}")
return [], state, False, 500, PluginException(preset=PluginException.Preset.UNKNOWN, data=error)
Expand Down

0 comments on commit a693482

Please sign in to comment.