Checking if the request was successful