Closed claytongulick closed 8 months ago
In line 18 of parse.js:
const filterResult = parseFilters(filter, queryErrors?.filter);
the call to parseFilters is swallowing the errors. If a filter error occurred, line 89 of parseFilters swallows it:
if (filters) { if (filtersError.length) { errors = filtersError; } else if (!isObject(filters)) { ...
filters, in this case is undefined so the errors don't get reported back to the calling function.
The end result is when calling this:
let parsed = parser.parse(string);
If there is an error, the result is an empty data field and an empty errors array.
seems like a bug to me
Thanks for the bug report Clayton. Yeah, it looks like that check for filtersError should be moved up / out of this block.
filtersError
We'll get a fix out for that shortly.
In line 18 of parse.js:
the call to parseFilters is swallowing the errors. If a filter error occurred, line 89 of parseFilters swallows it:
filters, in this case is undefined so the errors don't get reported back to the calling function.
The end result is when calling this:
If there is an error, the result is an empty data field and an empty errors array.