hugolib: Fix error handling for JSON front matter
hugolib: Fix error handling for JSON front matter

Fixes #3610

gohugoio/hugo,fedelibre/hugo,anthonyfok/hugo,anthonyfok/hugo,mdhender/hugo,gohugoio/hugo,gohugoio/hugo,anthonyfok/hugo,mdhender/hugo,fedelibre/hugo,fedelibre/hugo,fedelibre/hugo,mdhender/hugo,mdhender/hugo