Skip to content

Commit

Permalink
consistent variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sodle-splunk committed Mar 25, 2024
1 parent 9468389 commit ea0ffd8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions f5bigipltm_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def _process_json_response(self, r, action_result):
message = "Error from server. Status Code: {0} Data from server: {1}".format(
r.status_code, error_msg)
except Exception as e:
_, error_msg = self._get_error_message_from_exception(e)
_, error_message = self._get_error_message_from_exception(e)
message = "Unknown error occurred while processing the output response from the server. " \
"Status Code: {0}. Data from server: {1}".format(r.status_code, error_msg)
"Status Code: {0}. Data from server: {1}".format(r.status_code, error_message)

return RetVal(action_result.set_status(phantom.APP_ERROR, message), None)

Expand Down Expand Up @@ -213,9 +213,9 @@ def _make_rest_call(self, endpoint, action_result, method="get", data=None, **kw
try:
url = "{}{}".format(self._base_url, endpoint)
except Exception as e:
error_code, error_msg = self._get_error_message_from_exception(e)
error_code, error_message = self._get_error_message_from_exception(e)
return RetVal(action_result.set_status(phantom.APP_ERROR, "Error occurred while creating the REST URL for the API call. "
"Error Code: {0}. Error Message: {1}".format(error_code, error_msg)), None)
"Error Code: {0}. Error Message: {1}".format(error_code, error_message)), None)

try:
r = request_func(
Expand All @@ -225,9 +225,9 @@ def _make_rest_call(self, endpoint, action_result, method="get", data=None, **kw
data=data,
**kwargs)
except Exception as e:
error_code, error_msg = self._get_error_message_from_exception(e)
error_code, error_message = self._get_error_message_from_exception(e)
return RetVal(action_result.set_status(phantom.APP_ERROR, "Error occurred while making the REST call to the F5 server. "
"Error Code: {0}. Error Message: {1}".format(error_code, error_msg)), None)
"Error Code: {0}. Error Message: {1}".format(error_code, error_message)), None)

return self._process_response(r, action_result)

Expand Down

0 comments on commit ea0ffd8

Please sign in to comment.