master: cleaner error path