|
|
@ -11,7 +11,7 @@ pub struct SectionId(pub crate::model::SectionId); |
|
|
|
impl SectionId { |
|
|
|
impl SectionId { |
|
|
|
fn get_section(self, sections: &Sections) -> Result<SectionRef, RequestError> { |
|
|
|
fn get_section(self, sections: &Sections) -> Result<SectionRef, RequestError> { |
|
|
|
sections.get(&self.0).cloned().ok_or_else(|| { |
|
|
|
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 { |
|
|
|
} else { |
|
|
|
Err(RequestError::with_name( |
|
|
|
Err(RequestError::with_name( |
|
|
|
ErrorCode::NoSuchSectionRun, |
|
|
|
ErrorCode::NoSuchSectionRun, |
|
|
|
"section run does not exist", |
|
|
|
"no such section run", |
|
|
|
"section run", |
|
|
|
"section run", |
|
|
|
)) |
|
|
|
)) |
|
|
|
} |
|
|
|
} |
|
|
|