[Upg] refactoring error system