difftreelog
Add proper common pallet errors
in: master
1 file changed
pallets/common/src/lib.rsdiffbeforeafterboth366 /// Tried to store more data than allowed in collection field366 /// Tried to store more data than allowed in collection field367 CollectionFieldSizeExceeded,367 CollectionFieldSizeExceeded,368368369 /// Tried to store more property data than allowed369 NoSpaceForProperty,370 NoSpaceForProperty,370371372 /// Tried to store more property keys than allowed371 PropertyLimitReached,373 PropertyLimitReached,374375 /// Unable to read array of unbounded keys376 UnableToReadUnboundedKeys,372 }377 }373378374 #[pallet::storage]379 #[pallet::storage]865 ) -> Result<Vec<PropertyKey>, DispatchError> {870 ) -> Result<Vec<PropertyKey>, DispatchError> {866 keys.into_iter()871 keys.into_iter()867 .map(|key| -> Result<PropertyKey, DispatchError> {872 .map(|key| -> Result<PropertyKey, DispatchError> {868 // TODO Fix error869 key.try_into()873 key.try_into()870 .map_err(|_| DispatchError::Other("Can't read property key"))874 .map_err(|_| <Error<T>>::UnableToReadUnboundedKeys.into())871 })875 })872 .collect::<Result<Vec<PropertyKey>, DispatchError>>()876 .collect::<Result<Vec<PropertyKey>, DispatchError>>()873 }877 }