work on improving error messages

This commit is contained in:
Doug Hoyte
2024-09-05 01:03:28 -04:00
parent 150ea1b887
commit 271254f4b6
5 changed files with 57 additions and 22 deletions

View File

@ -121,6 +121,8 @@ struct NostrFilter {
explicit NostrFilter(const tao::json::value &filterObj, uint64_t maxFilterLimit) {
uint64_t numMajorFields = 0;
if (!filterObj.is_object()) throw herr("provided filter is not an object");
for (const auto &[k, v] : filterObj.get_object()) {
if (v.is_array() && v.get_array().size() == 0) {
neverMatch = true;