slight refactor
add origin to error events; use in outputs

[#77980564]