handle connection error
use config