[pt::Builder] add error handling

first pass at some of the TODO items