From 6043f4bac7476f09dde64d51dd91744b84bbcf9a Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Wed, 30 Sep 2020 14:42:05 -0600 Subject: [PATCH] More consistent MQTT error messages --- src/mqtt/request/sections.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mqtt/request/sections.rs b/src/mqtt/request/sections.rs index e86d23c..206b9de 100644 --- a/src/mqtt/request/sections.rs +++ b/src/mqtt/request/sections.rs @@ -11,7 +11,7 @@ pub struct SectionId(pub crate::model::SectionId); impl SectionId { fn get_section(self, sections: &Sections) -> Result { sections.get(&self.0).cloned().ok_or_else(|| { - RequestError::with_name(ErrorCode::NoSuchSection, "section not found", "section") + RequestError::with_name(ErrorCode::NoSuchSection, "no such section", "section") }) } } @@ -114,7 +114,7 @@ impl IRequest for CancelSectionRunIdRequest { } else { Err(RequestError::with_name( ErrorCode::NoSuchSectionRun, - "section run does not exist", + "no such section run", "section run", )) }