[build] handle errors in helpers