Revert "Remove error tracking"

This reverts commit 3a0542be13e6c00e2e53bbde1dd13f44ff62f5b4.