How can we detect if `build` encountered an error?