Catch ping errors and return a failure result