inventory error catching