BWS reference impl: Clear [[buffer]] on [[error]]