Catch request errors for debugging.