Normalize error codes for terms