Skip to content

Commit 6998e3b

Browse files
committed
Improve commit error
1 parent c96ea16 commit 6998e3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/commit.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ impl Commit {
165165
}
166166
};
167167

168+
// We apply the changes and create a new resource, but don't index it yet.
168169
let mut resource_new = self
169170
.apply_changes(resource_old.clone(), store, false)
170171
.map_err(|e| format!("Error applying changes to Resource {}. {}", self.subject, e))?;
@@ -175,7 +176,7 @@ impl Commit {
175176
let parent_str = parent.to_string();
176177
if !self.subject.starts_with(&parent_str) {
177178
return Err(format!(
178-
"The parent '{}' is not part of the URL of the new subject '{}'.",
179+
"You cannot create a new Resource with this subject, because the parent '{}' is not part of the URL of the new subject '{}'.",
179180
parent_str, self.subject
180181
)
181182
.into());

0 commit comments

Comments
 (0)