From a454613b76aa3db801bcf74c576ea316f88b3061 Mon Sep 17 00:00:00 2001 From: Christian Pointner <equinox@helsinki.at> Date: Sun, 16 Sep 2018 13:56:01 +0200 Subject: [PATCH] some more refactoring --- api/v1/api_uploads.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/v1/api_uploads.go b/api/v1/api_uploads.go index 88f8c09..fb58f4d 100644 --- a/api/v1/api_uploads.go +++ b/api/v1/api_uploads.go @@ -288,7 +288,8 @@ func (api *API) TestFileFlowJS() http.Handler { } if chunk > uint64(len(file.chunks)) { - sendWebResponse(w, http.StatusConflict, ErrorResponse{Error: fmt.Sprintf("invalid chunk number %d, the flow.js upload is only %d chunks long", chunk, len(file.chunks))}) + errStr := fmt.Sprintf("invalid chunk number %d, the flow.js upload is only %d chunks long", chunk, len(file.chunks)) + sendWebResponse(w, http.StatusConflict, ErrorResponse{Error: errStr}) return } switch file.chunks[chunk-1].GetState() { -- GitLab