better connection error structure in general