From 3ca91bba7f6f3a7e3de0153b38c3ab8992627f98 Mon Sep 17 00:00:00 2001 From: Samir Patel <48686912+54mir@users.noreply.github.com> Date: Tue, 2 Nov 2021 15:49:59 -0500 Subject: [PATCH] More specific error message on mismatch --- http/handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http/handler.go b/http/handler.go index 9b65fe257..28663cc23 100644 --- a/http/handler.go +++ b/http/handler.go @@ -2722,6 +2722,9 @@ func (h *Handler) handlePostImport(w http.ResponseWriter, r *http.Request) { defer qcx.Abort() if isImportRequestEmpty(req) { + if len(req.ColumnIDs) > 0 || len(req.ColumnKeys) > 0 { + http.Error(w, "columns provided but no values", http.StatusBadRequest) + } return } if err := h.api.ImportValue(r.Context(), qcx, req, opts...); err != nil {