The master_failure_mode=error_on_write mode was broken due to a faulty assumption that all successfully routed queries would produce a target. This is not the case when a write in error_on_write mode is received.