We should consider a code review pass over our Lua filters to send all calls to the pandoc API through pcall, like we did in #6211 for run_json_filter.
In quarto we often can provide a more informative error message than the hard failure which Pandoc tends to produce.