change error handling when connecting to a tcp upstream