# QWIK api returns 500 status

**URL:** <https://forum.builder.io/t/qwik-api-returns-500-status/5294>\
**Category:** Bugs\
**Created:** [April 4, 2024, 5:23am UTC](https://forum.builder.io/t/qwik-api-returns-500-status/5294 "2024-04-04T05:23:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaewon](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@chaewon](https://forum.builder.io/u/chaewon)\
**Post date:** [April 4, 2024, 5:23am UTC](https://forum.builder.io/t/qwik-api-returns-500-status/5294/1 "2024-04-04T05:23:44Z")

</div>

_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.io: Visual Development Platform](https://builder.io/content/0c7700788ae5496598b52738cb67a7ba)_

**Builder public api key**  
_a73e01a1c6a34697ab20d49c30aab093_

**Detailed steps to reproduce the bug**

- Use the Qwik API to retrieve the content  
[https://cdn.builder.io/api/v1/qwik/marketing-fe-alpha?apiKey=a73e01a1c6a34697ab20d49c30aab093&userAttributes.urlPath=%2F&includeUnpublished=true](https://cdn.builder.io/api/v1/qwik/marketing-fe-alpha?apiKey=a73e01a1c6a34697ab20d49c30aab093&userAttributes.urlPath=%2F&includeUnpublished=true)\*

**Response**

```json
{
    "status": 500,
    "message": "Error: The <Type> of the JSX element must be either a string or a function. Instead, it's a \"undefined\": undefined."
}

```

**Code stack you are integrating Builder with**  
_JS, REST API_

**Reproducible code example**

```curl
curl --location 'https://cdn.builder.io/api/v1/qwik/marketing-fe-alpha?apiKey=a73e01a1c6a34697ab20d49c30aab093&userAttributes.urlPath=%2F&includeUnpublished=true'

```

```auto
<script async src="https://cdn.builder.io/js/qwik/qwikloader.js"></script>
<script>
    (async () => {
        const qwikUrl = new URL('https://cdn.builder.io/api/v1/qwik/marketing-fe-alpha');
        qwikUrl.searchParams.set('apiKey', 'a73e01a1c6a34697ab20d49c30aab093');
        qwikUrl.searchParams.set('userAttributes.urlPath', '/');
        qwikUrl.searchParams.set('includeUnpublished', true);

        const response = await fetch(qwikUrl);
        const { html } = await response.json();
        document.querySelector('#marketing-area').innerHTML = html;
    })();
</script>

```

---

<div class="post-metadata">

**Author:** ![sheema](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sheema](https://forum.builder.io/u/sheema)\
**Post date:** [April 5, 2024, 11:34am UTC](https://forum.builder.io/t/qwik-api-returns-500-status/5294/2 "2024-04-05T11:34:21Z")

</div>

Hey @chaewon It appears that your live page is currently inaccessible, which might be contributing to the error with the QWIK API. I’ve attached a screenshot for your reference.

 ![Screenshot 2024-04-05 at 4.49.22 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/d/df69a5211a0114f65ef1a4af2146900c786b8c7f.png)

I’ve tested this on my space and found that the QWIK API is functioning as expected.  
[https://cdn.builder.io/api/v1/qwik/vercel?apiKey=81994bd6a6634c5e899ff6a840c845a1&url=%2F&includeUnpublished=true](https://cdn.builder.io/api/v1/qwik/vercel?apiKey=81994bd6a6634c5e899ff6a840c845a1&url=%2F&includeUnpublished=true)

---

<div class="post-metadata">

**Author:** ![chaewon](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@chaewon](https://forum.builder.io/u/chaewon)\
**Post date:** [April 8, 2024, 12:05am UTC](https://forum.builder.io/t/qwik-api-returns-500-status/5294/3 "2024-04-08T00:05:36Z")

</div>

Sorry @sheema, I attached the test environment live page. I’ll share the live page you can access.  
**Builder content link**  
_[Builder.io: Visual Development Platform](https://builder.io/content/4e41e2a0d8d04ecc80a412e8977b527f)_  
[https://cdn.builder.io/api/v1/qwik/marketing-fe?apiKey=a73e01a1c6a34697ab20d49c30aab093&userAttributes.urlPath=%2F&includeUnpublished=true](https://cdn.builder.io/api/v1/qwik/marketing-fe?apiKey=a73e01a1c6a34697ab20d49c30aab093&userAttributes.urlPath=%2F&includeUnpublished=true)

---

<div class="post-metadata">

**Author:** ![sheema](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@sheema](https://forum.builder.io/u/sheema)\
**Post date:** [April 18, 2024, 9:14am UTC](https://forum.builder.io/t/qwik-api-returns-500-status/5294/4 "2024-04-18T09:14:08Z")

</div>

Hey @chaewon I created a test page in your space with the url path as /builder-test. I am able to get the results from the QWIK API [https://cdn.builder.io/api/v1/qwik/marketing-fe?apiKey=a73e01a1c6a34697ab20d49c30aab093&userAttributes.urlPath=/builder-test&includeUnpublished=true](https://cdn.builder.io/api/v1/qwik/marketing-fe?apiKey=a73e01a1c6a34697ab20d49c30aab093&userAttributes.urlPath=/builder-test&includeUnpublished=true). I suspect in your case the issue is with the value of the url-path.
