jsonfilter: improve error reporting