Corrupted document breaking search query

I using the search api to get a list of document
https://smartspending.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=100&fetchLinks=&lang=zh-hk&ref=XtkGcRAAAB0ANTtf

Then I catch an error of
Error: Parse error on line 1:
...,"isBroken":false}}}
-----------------------^
Expecting ',', ']'

I think there is some document on prismic broken after import then prevent us to retrieve the list of document, as the api response ok when I just get first 50 documents instead of first 100.

Can any technical support help me to fix? It quite urgent and affecting our business. It now stopping our website from getting document on prismic.

Hi Roy,

I’m sorry to see you facing this issue.

I did some investigation in your api browser and it seems to be this document which is cause the error:
https://smartspending.prismic.io/api/v2/documents/search?ref=XtkGcRAAAB0ANTtf&pageSize=1&page=53#format=html

If you view the JSON version it causes an error
https://smartspending.prismic.io/api/v2/documents/search?ref=XtkGcRAAAB0ANTtf&pageSize=1&page=53#format=json

Try archiving this to see if that helps.

Thanks.

1 Like

It work. Thanks a lot for your help!

You’re very welcome. Have a nice day :grin:

Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.