Revert "fix trace error usage"

This reverts commit 404f8e30b7caa168b4f82665cdeb38e125380961.

Close #6206