From 7bdd6d8f2d18022c34986a6eea4620d8eb6dcb3a Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 18 Mar 2021 12:18:19 +0100 Subject: fix: handle error for commit creation on repos --- src/repository/models.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3-18-g5258