Malformed JSON response in document.type request

Hello, I'm getting malformed JSON responses when querying a specific page,[[at(document.type, "drinks")]] (this is the actual response, i.e. it is broken after the 'results' property):


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?

1 Like

Hi Matt,

Welcome to the Prismic community.
This might be caused by some special character 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.


1 Like

Hi Fares,

This seemed to have resolved itself a few weeks ago, but I'm encountering the same issue again and I can't publish updates to my site. Has your dev team been able to track down what might be occurring?


Hi Matt,

A fix has been done for this and being deployed progressively.

Hmm, sorry -- Still seeing the error, e.g. through the link I posted at the beginning of this thread.

Hi Matt,

As I have mentioned before, the issue has been fixed and we are deploying it progressively (currently deployed for a few repositories)

If would like we can give alpha access to this fix if you need it urgently (need to give us the repository/s that you want to activate if for).

Ah -- Sorry, I didn't understand what you meant by a progressive deployment.

It would be great if you could give my 'barisabel' repository alpha access, thank you!

1 Like

Hi Matt,

We are currently doing some final tests on this fix, and I will let you know once it will be available for alpha testing.

1 Like

Hi Matt,

May I know if you are using Slice Machine?

Hi Fares -- No, this was created well before that was available so I'm not using it.

1 Like


My newly created repository (using Slice Machine, no broken links) is having the same problem. The repository is system76 and the exact URL that is causing the problem is:{"_tracker"%3A"qj0hiZ83"%2C""%3A{"preview"%3A""}}&q=[[at("director-of-web-development")]]

Hey @hosting, the fix for this issue should be now present in all repositories.
Let us know if you experience this or any other error related to this.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.