cache_json_file() reports function not found
if the json file is empty
#259
Labels
bug
Something isn't working
function not found
if the json file is empty
#259
AxoSyslog
Version of AxoSyslog
Platform
x86_64 linux (nightly docker image)
Issue
Failure
When calling
cache_json_file
with an (almost) empty json file, AxoSyslog reportsError parsing filterx expression: cache_json_file(): function not found
instead of allowing for empty files (as null or something), or reporting an error pointing out that the json file is empty.Examples for Json files triggering this:
""
(0 bytes)"\n"
"{\n"
Not every invalid file is handled incorrectly:
"invalid"
->Error parsing filterx expression: cache_json_file(): failed to parse JSON file: json (unexpected character)
Steps to reproduce
Configuration
Input and output logs (if possible)
The text was updated successfully, but these errors were encountered: