diff --git a/cumulus/pallets/xcm-handler/src/lib.rs b/cumulus/pallets/xcm-handler/src/lib.rs index 13b1361d9dc6e1e0d3f870e8f24bb18c7af987e6..1f80eee78075ed0d8b347a29726d0a416f2b1634 100644 --- a/cumulus/pallets/xcm-handler/src/lib.rs +++ b/cumulus/pallets/xcm-handler/src/lib.rs @@ -157,7 +157,7 @@ impl<T: Config> SendXcm for Module<T> { let hash = T::Hashing::hash(&data); T::UpwardMessageSender::send_upward_message(data) - .map_err(|_| XcmError::Undefined)?; + .map_err(|_| XcmError::CannotReachDestination)?; Self::deposit_event(RawEvent::UpwardMessageSent(hash)); Ok(()) @@ -170,9 +170,8 @@ impl<T: Config> SendXcm for Module<T> { recipient: (*id).into(), data, }; - // TODO: Better error here T::HrmpMessageSender::send_hrmp_message(message) - .map_err(|_| XcmError::Undefined)?; + .map_err(|_| XcmError::CannotReachDestination)?; Self::deposit_event(RawEvent::HrmpMessageSent(hash)); Ok(()) }