more error catching for updating inventory