diff options
| author | Rutger Broekhoff | 2023-12-29 23:52:36 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2023-12-29 23:52:36 +0100 |
| commit | a1888049b835c3ef6ef46f05b7de2b4021350496 (patch) | |
| tree | b416ffb99f63ea689c6ff01286f6d508930439c8 | |
| parent | e81fc818f988f3230d1146f15f5e3ad71449a5da (diff) | |
| download | gitolfs3-a1888049b835c3ef6ef46f05b7de2b4021350496.tar.gz gitolfs3-a1888049b835c3ef6ef46f05b7de2b4021350496.zip | |
Log more
| -rw-r--r-- | cmd/git-lfs-server/main.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/git-lfs-server/main.go b/cmd/git-lfs-server/main.go index 50675ae..3921646 100644 --- a/cmd/git-lfs-server/main.go +++ b/cmd/git-lfs-server/main.go | |||
| @@ -152,6 +152,7 @@ func (h *handler) handleDownloadObject(ctx context.Context, repo string, obj par | |||
| 152 | } | 152 | } |
| 153 | // TODO: consider not making this an object-specific, but rather a | 153 | // TODO: consider not making this an object-specific, but rather a |
| 154 | // generic error such that the entire Batch API request fails. | 154 | // generic error such that the entire Batch API request fails. |
| 155 | log("Failed to query object information (full path: %s): %s", fullPath, err) | ||
| 155 | return makeObjError(obj, "Failed to query object information", http.StatusInternalServerError) | 156 | return makeObjError(obj, "Failed to query object information", http.StatusInternalServerError) |
| 156 | } | 157 | } |
| 157 | if info.ChecksumSHA256 != "" && strings.ToLower(info.ChecksumSHA256) != obj.fullHash { | 158 | if info.ChecksumSHA256 != "" && strings.ToLower(info.ChecksumSHA256) != obj.fullHash { |
| @@ -165,6 +166,7 @@ func (h *handler) handleDownloadObject(ctx context.Context, repo string, obj par | |||
| 165 | if err != nil { | 166 | if err != nil { |
| 166 | // TODO: consider not making this an object-specific, but rather a | 167 | // TODO: consider not making this an object-specific, but rather a |
| 167 | // generic error such that the entire Batch API request fails. | 168 | // generic error such that the entire Batch API request fails. |
| 169 | log("Failed to generate action href (full path: %s): %s", fullPath, err) | ||
| 168 | return makeObjError(obj, "Failed to generate action href", http.StatusInternalServerError) | 170 | return makeObjError(obj, "Failed to generate action href", http.StatusInternalServerError) |
| 169 | } | 171 | } |
| 170 | 172 | ||
| @@ -260,6 +262,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||
| 260 | permGranted := err == nil | 262 | permGranted := err == nil |
| 261 | var exitErr *exec.ExitError | 263 | var exitErr *exec.ExitError |
| 262 | if err != nil && !errors.As(err, &exitErr) { | 264 | if err != nil && !errors.As(err, &exitErr) { |
| 265 | log("Error checking access info (running %s): %s", cmd, err) | ||
| 263 | makeRespError(w, "Failed to query access information", http.StatusInternalServerError) | 266 | makeRespError(w, "Failed to query access information", http.StatusInternalServerError) |
| 264 | return | 267 | return |
| 265 | } | 268 | } |