summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-18 12:18:19 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-18 12:18:19 +0100
commit7bdd6d8f2d18022c34986a6eea4620d8eb6dcb3a (patch)
treec3718080abcbe0a6cc52735bcc6726952c6494a8 /src
parent214137b65413daff684cfe8df4d544ea0cb78516 (diff)
fix: handle error for commit creation on repos
Diffstat (limited to 'src')
-rw-r--r--src/repository/models.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repository/models.rs b/src/repository/models.rs
index 5b7b445..de82d45 100644
--- a/src/repository/models.rs
+++ b/src/repository/models.rs
@@ -225,7 +225,7 @@ impl Repository {
let commits_result =
Commit::create(pool.clone(), commits).await;
if let Err(e) = commits_result {
- panic!("{}", e);
+ return Err(e);
}
Ok(repo)