Need to create a test for the API endpoint and also add an exception for no connection.
Need to create a test for the API endpoint and also add an exception for no connection.