handle_api_errors: Handle API Errors
Description
This function checks for errors in the HTTP response and stops execution
if the request was not successful.
Usage
handle_api_errors(response, url = "")
Value
None. It stops execution if an error is detected.
Arguments
- response
An HTTP response object.
- url
A string representing the requested URL (for more informative error messages).