client error handler
connection error handling, retries instead of crashes