emit error events when building errors

[#77941808]