Catch database connection errors