Quality Gates: better handling of errors