worker: simplify master error handling