Skip to content

Remove broad Exception Catch in test_connectivity #21

@zdc217

Description

@zdc217

def test_connectivity(self):
try:
self._get_access_token()
return True
except Exception:
return False

Lines 90 and 91 are not allowing the exception to bubble up to the SOAR log so we don't know what is happening when the test_connectivity function fails in the SOAR Clearpass app. Removing those lines should give us a clearer error message.

Tasks

  • remove the catch for Exception
  • probably - call raise_on_status
  • add a catch for 403 Forbidden
  • add a catch for 500 Server Error
  • add a catch for 404 Not Found
  • stretch - think about how we want to handle time-outs - Ed doesn't mind leaving these to bubble up, though.
  • update CHANGELOG and add a tag with a bumped up micro revision to this library

Metadata

Metadata

Assignees

Labels

good to goAn acceptable task list is present in this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions