Hi,
We’re getting “Service Unavailable” when trying to pull content. We were on a free account for development but have since upped the account thinking that the API limits were the issue. After upgrading we still can’t pull from the CMS using fetchEntries
function.
Weirdly, we can use the rest API by fetching directly. Since we’re hoping to launch today and changing everything to using the API would take a lot of effort and push the launch date, we’re hoping to fix the fetchEntries
issue.
Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank.
Builder content link
Builder public api key
9da1c69eaad44798835fb0df36bc255a
What are you trying to accomplish
Use the fetchEntries
function @builder.io/sdk-react
Screenshots or video link
Code stack you are integrating Builder with
Hydrogen (Remix), Oxygen.
*Reproducible code example
Code has been working for several weeks, no adjustments have been made. Error is “Service Unavailable” see screenshot.
await fetchEntries({
...builderConfig,
model: 'room-images',
options: {
enrich: true
},
query: {
'data.inspirations.inspiration.id': inspiration,
},
})
This (below) fetch works for the same content type using the same key and same query.
let res = await fetch(`https://cdn.builder.io/api/v3/content/${model}?apiKey=${env?.PUBLIC_BUILDER_KEY}&limit=100&offset=${offset}${query}&includeRefs=true&noTraverse=false`, {
headers: {
'content-type': 'application/json',
},
method: 'GET'
}).then(r => r.json());