Add information to failed api requests

Add addition information when requests for tag suggestions fail.
This commit is contained in:
Robin Malley 2021-04-09 19:17:22 +00:00
parent 9e51de6c8e
commit 7cc5e8d0ef
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ local function api_get(req)
we're searching for, potentially causing a DoS with a
sufficiently backtrack-ey search/tag combination.
]]
assert(data:match("^[a-zA-Z0-9,%s-]+$"),"Bad characters in tag")
assert(data:match("^[a-zA-Z0-9,%s-]+$"),string.format("Bad characters in tag: %q",data))
return suggest_tags(req,data)
end
end