How to deal with errors and what to do in case of necessity