Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: go/src/infra/appengine/test-results/frontend/upload.go

Issue 2355353002: Return 409 error when uploading build with same number again (Closed)
Patch Set: Fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | go/src/infra/appengine/test-results/frontend/upload_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/appengine/test-results/frontend/upload.go
diff --git a/go/src/infra/appengine/test-results/frontend/upload.go b/go/src/infra/appengine/test-results/frontend/upload.go
index 892e8820f4ccf4d48544557bd5ade92356310a59..74afd87c1b8f08789676be5e90cf6a6f9ec3417a 100644
--- a/go/src/infra/appengine/test-results/frontend/upload.go
+++ b/go/src/infra/appengine/test-results/frontend/upload.go
@@ -279,7 +279,11 @@ func updateFullResults(c context.Context, data io.Reader) error {
}
if err := updateIncremental(c, &incr); err != nil {
logging.WithError(err).Errorf(c, "updateFullResults: updateIncremental")
- return statusError{err, http.StatusInternalServerError}
+ code := http.StatusInternalServerError
+ if se, ok := err.(statusError); ok {
+ code = se.code
+ }
+ return statusError{err, code}
}
p := GetUploadParams(c)
« no previous file with comments | « no previous file | go/src/infra/appengine/test-results/frontend/upload_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698