Skip to content

Commit a6e2658

Browse files
committed
Improve commit error
1 parent 17cd604 commit a6e2658

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
@@ -158,6 +158,7 @@ impl Commit {
158158
}
159159
};
160160

161+
// We apply the changes and create a new resource, but don't index it yet.
161162
let mut resource_new = self
162163
.apply_changes(resource_old.clone(), store, false)
163164
.map_err(|e| format!("Error applying changes to Resource {}. {}", self.subject, e))?;
@@ -168,7 +169,7 @@ impl Commit {
168169
let parent_str = parent.to_string();
169170
if !self.subject.starts_with(&parent_str) {
170171
return Err(format!(
171-
"The parent '{}' is not part of the URL of the new subject '{}'.",
172+
"You cannot create a new Resource with this subject, because the parent '{}' is not part of the URL of the new subject '{}'.",
172173
parent_str, self.subject
173174
)
174175
.into());

0 commit comments

Comments
 (0)