generic error handler for all connectors