diff --git a/monkey/infection_monkey/transport/island_api_client_errors.py b/monkey/infection_monkey/transport/island_api_client_errors.py new file mode 100644 index 000000000..d0dbeb0c4 --- /dev/null +++ b/monkey/infection_monkey/transport/island_api_client_errors.py @@ -0,0 +1,30 @@ +class IslandAPIError(Exception): + """ + Raised when something goes wrong when calling the Island API + """ + + pass + + +class IslandAPITimeoutError(IslandAPIError): + """ + Raised when the API request hits a timeout + """ + + pass + + +class IslandAPIConnectionError(IslandAPIError): + """ + Raised when the API request can't find/connect to the Island + """ + + pass + + +class IslandAPIRequestFailedError(IslandAPIError): + """ + Raised when the API request fails(malformed request or an error on the API side) + """ + + pass