add error handling before "builder->build". bugid:112549