fireREST
fireREST copied to clipboard
Add custom exception for connection errors
Currently if Connection is refused by FMC (e.g. not reachable) ConnectionError is thrown.
ConnectionError: HTTPSConnectionPool(host='fmc.example.com', port=443): Max
retries exceeded with url: /api/fmc_platform/v1/auth/generatetoken (Caused by
NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x10dc3f490>:
Failed to establish a new connection: [Errno 61] Connection refused'))
This should be replaced with a more user friendly custom exception