Fix/527/add error handlers