exml:to_pretty_iolist/1 sometimes returns a binary not wrapped in a list. This binary was later provided to list_to_binary/1 which caused a crash. The solution was to replace call to list_to_binary/1 with iolist_to_binary/1 which correctly deals with bare binaries.
exml:to_pretty_iolist/1
sometimes returns a binary not wrapped in a list. This binary was later provided tolist_to_binary/1
which caused a crash. The solution was to replace call tolist_to_binary/1
withiolist_to_binary/1
which correctly deals with bare binaries.