How can I prevent 'Error messages' to be shown to anonymous users?
Like @Screenack suggested.


Navigate to /admin/config/development/logging 
Set the radio to None
Select Save Configuration


Please note that I recommend keeping the errors on locally and trying to fix them.