When a file that contains "binary characters" (i.e. non-ASCII or non-printable characters) is read by the fiesystem and passed to http for output, the JSON parser errors out:
Malformed UTF-8 characters, possibly incorrectly encoded
Some form of file filtering or content handling needs to be added to make sure the application does not error out when listing directory contents that contains such files.
This was discovered when .DS_store files where mounted into the docker image, triggereing the above error.