diff --git a/cumulus/pallets/xcm-handler/src/lib.rs b/cumulus/pallets/xcm-handler/src/lib.rs index 13b1361d9d..1f80eee780 100644 --- a/cumulus/pallets/xcm-handler/src/lib.rs +++ b/cumulus/pallets/xcm-handler/src/lib.rs @@ -157,7 +157,7 @@ impl SendXcm for Module { 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 SendXcm for Module { 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(()) }