You have written the code to call an API. However, when authentication errors or timeouts occur, you don't know what to check ...