From 57bcfcd9e16412322f99b611d51d7839b6b59ba4 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Sat, 18 Jul 2026 00:05:49 +0700 Subject: [PATCH] fix: improve error message for invalid input in lookup functionality Updated the error response for invalid input in the handleLookup function to provide a clearer message indicating that the query must be an IP address or FQDN, enhancing user understanding of the input requirements. --- internal/httpapi/routes_lookup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/httpapi/routes_lookup.go b/internal/httpapi/routes_lookup.go index 2ea2d90..a20c718 100644 --- a/internal/httpapi/routes_lookup.go +++ b/internal/httpapi/routes_lookup.go @@ -27,7 +27,7 @@ func (s *Server) handleLookup(w http.ResponseWriter, r *http.Request) { res, err := lookup.Lookup(s.store, a.TenantID, q) if err != nil { if errors.Is(err, store.ErrInvalidInput) { - writeProblem(w, http.StatusBadRequest, "Bad Request", err.Error()) + writeProblem(w, http.StatusBadRequest, "Bad Request", "query must be an IP address or FQDN") return } writeStoreErr(w, err)