A.F....... [ZBX-8349] refactored error handling