stop_for_status function

Catch error for an HTTP response