diff --git a/api/v1/api_uploads.go b/api/v1/api_uploads.go
index 88f8c09f2b0d1b168e87ae582830f921d3c3db5d..fb58f4de52431c09793857f99b928e8dda1a994c 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() {