Revert "Revert "Обработка ошибок""

This reverts commit c70c5b09c2ed31356505bc7267cf113ab29da3c6.