From cb66c0137b291984dfbbac480c66db8f30b97964 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 19 Feb 2025 15:36:24 +0800 Subject: [PATCH] repo/contrib/one: Add missing error check --- http_handle_repo_contrib_one.go | 4 ++++ diff --git a/http_handle_repo_contrib_one.go b/http_handle_repo_contrib_one.go index 42edd8c24253a669ed69b7652c85df5bd19d7ced..6841f2b363bc36654b7d2d44d6a550272f01a135 100644 --- a/http_handle_repo_contrib_one.go +++ b/http_handle_repo_contrib_one.go @@ -50,6 +50,10 @@ } 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) -- 2.48.1