better error on db fail