From cb66c0137b291984dfbbac480c66db8f30b97964 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 19 Feb 2025 15:36:24 +0800 Subject: repo/contrib/one: Add missing error check --- http_handle_repo_contrib_one.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http_handle_repo_contrib_one.go b/http_handle_repo_contrib_one.go index 42edd8c..6841f2b 100644 --- a/http_handle_repo_contrib_one.go +++ b/http_handle_repo_contrib_one.go @@ -50,6 +50,10 @@ func handle_repo_contrib_one(w http.ResponseWriter, r *http.Request, params map[ params["destination_commit"] = destination_commit patch, err := destination_commit.Patch(source_commit) + if err != nil { + http.Error(w, "Error getting patch: "+err.Error(), http.StatusInternalServerError) + return + } params["file_patches"] = make_usable_file_patches(patch) render_template(w, "repo_contrib_one", params) -- cgit v1.2.3