STYLE: Clean up pipeline and uniformize error catching

Change-Id: I77ac74f0a01b246e9f8069bda33d74573259c952
Merge "STYLE: Clean up pipeline and uniformize error catching"