Change test conditions for handle_error