Malformed JSON response in document.type request

Hello, I'm getting malformed JSON responses when querying a specific page, https://barisabel.cdn.prismic.io/api/v2/documents/search?ref=YGH1SRAAACIAK-NL&q=[[at(document.type, "drinks")]] (this is the actual response, i.e. it is broken after the 'results' property):

{"page":1,"results_per_page":20,"results_size":1,"total_results_size":1,"total_pages":1,"next_page":null,"prev_page":null,"results":[

This has occurred to people in other threads where they have links to documents that were removed, but this type doesn't have any links, just slices of text-based content.

Requesting data for other content types works. This content is fetched properly when viewing it in your API browser under the HTML format but displays an error when viewing it in the JSON format.

I'm using Nuxt.js but I've isolated this issue to something on your end or with my content (e.g., bad characters somewhere?) so I've posted it in the REST API forum -- I'm wondering if your team might have any ideas what is going on?

Hi Matt,

Welcome to the Prismic community.

Well clearly the problem is at our end, it might be caused by some special character is breaking the JSON construction in our backend as you said.

I have been able to reproduce the issue and I will create an issue in our tracker to have somebody from our dev team to work on it, and we will let you know once we get some info.

Best,
Fares

1 Like