Return an error instead of crashing on econnrefused