# Internal server error when using QWIK API

**URL:** <https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473>\
**Category:** Bugs\
**Created:** [December 15, 2021, 3:28pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473 "2021-12-15T15:28:28Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![vperrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/vperrin/32/196_2.png) [@vperrin](https://forum.builder.io/u/vperrin)\
**Post date:** [December 15, 2021, 3:28pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/1 "2021-12-15T15:28:28Z")

</div>

Hi team!

I got interested in the new QWIK API and decided to give it a shot as it seems to have a big potential to improve performance.  
I ran into some issues that are worth reporting. For several pages, the API returns a 500 error, while for other pages it is working fine. The only explanation I have so far is that those pages contain a symbol that fetches data from an endpoint.

Any help is appreciated.  
Best,  
Vincent

Working API call  
[https://cdn.builder.io/api/v1/qwik/blog-page?userAttributes.urlPath=/worth-the-hype-fenty-beauty-lip-cream-lip-gloss-review](https://cdn.builder.io/api/v1/qwik/blog-page?userAttributes.urlPath=/worth-the-hype-fenty-beauty-lip-cream-lip-gloss-review)

Failing API calls  
[https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/](https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/)  
[https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/category/fashion](https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/category/fashion)

P.S. Happy to DM my public key if needed.

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [December 15, 2021, 3:58pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/2 "2021-12-15T15:58:56Z")

</div>

Hi Vincent,

Thanks for reaching out. For me all of the URLs fail with `Error: organization is missing`. You need to append `&apiKey= YOUR_API_KEY`. Since you said that one URL used to work I assume the above is cut&paste error. Once you fix the URLs I am happy to look at it.

– Misko

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [December 15, 2021, 10:04pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/3 "2021-12-15T22:04:14Z")

</div>

Thanks for the repro instructions, should have a resolution for you soon.

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [December 17, 2021, 1:27am UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/4 "2021-12-17T01:27:46Z")

</div>

I have looked into it, and it will require a more complex fix. We will probably get back to it early next year.

---

<div class="post-metadata">

**Author:** ![vperrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/vperrin/32/196_2.png) [@vperrin](https://forum.builder.io/u/vperrin)\
**Post date:** [December 17, 2021, 9:38am UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/5 "2021-12-17T09:38:34Z")

</div>

Awesome, thanks for getting back to me.  
Would you know what is causing it and if there would be a way around it in the mean time?

Appreciate the help, thanks,  
Vincent

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [January 5, 2022, 7:27pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/6 "2022-01-05T19:27:26Z")

</div>

Still working on this, should have something soon. (Sorry holidays got in the way)

---

<div class="post-metadata">

**Author:** ![vperrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/vperrin/32/196_2.png) [@vperrin](https://forum.builder.io/u/vperrin)\
**Post date:** [January 5, 2022, 7:40pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/7 "2022-01-05T19:40:36Z")

</div>

Thanks for the update Misko, no worries, holidays are important!

Vincent

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [January 28, 2022, 8:11pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/8 "2022-01-28T20:11:36Z")

</div>

Hi @vperrin ,

Thank you for your patience. I think we were able to fix all of the issues. You can see it working here: [https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/category/fashion&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML](https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/category/fashion&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML)

As you can see this is on `qa.builder.io`. We would like you to give it a spin and let us know if there are any more issues before we push it to production.

– Misko

---

<div class="post-metadata">

**Author:** ![vperrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/vperrin/32/196_2.png) [@vperrin](https://forum.builder.io/u/vperrin)\
**Post date:** [January 28, 2022, 9:12pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/9 "2022-01-28T21:12:51Z")

</div>

Hi @Misko ,

Thanks for the update, much appreciated.  
That page seems to work indeed!

I have other pages that seem not to be working (for example the homepage with urlPath=/), I presume that is because it’s on your QA environment?

Thanks,  
Vincent

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [January 28, 2022, 9:29pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/10 "2022-01-28T21:29:07Z")

</div>

That should work so let me investigate next week.

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [January 31, 2022, 10:51pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/11 "2022-01-31T22:51:37Z")

</div>

Fixed: [https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML](https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML) But the content looks duplicated. Is that right? If not can you point me to a content URL that shows it rendered as you want it.

---

<div class="post-metadata">

**Author:** ![vperrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/vperrin/32/196_2.png) [@vperrin](https://forum.builder.io/u/vperrin)\
**Post date:** [January 31, 2022, 11:35pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/12 "2022-01-31T23:35:49Z")

</div>

Hi @Misko ,  
Thanks for getting back to me.  
The end result should be like [https://www.sachini.co.uk](https://www.sachini.co.uk) ( the width of the page is slightly different as there is max width in nextjs)  
I have the impression that 2 things are off:

- The first image is a symbol and should have text and another image on top of it, see the following fiddle  
[Builder.io: Drag and drop page builder and CMS](https://builder.io/fiddle/c4bbb023d12942258d3138d3ffbb4f8e)
- This page consist of two symbols which repeat themselves, but with a different offset in order for each symbol to show different posts. When building that page in the builder, I do notice indeed that the content is duplicated there as well. The input field offset I presume is loaded client side, while that field is used to adjust and URL to load the posts serverside (the fetch is within a Builder.isServer). Server side those input fields don’t exist when editing the page, so the default value is used for each of them, hence they appear to repeat each other.  
Using the content API or html API, each of those symbols shows a different post, as you can see on the website ([https://www.sachini.co.uk](https://www.sachini.co.uk))

Please let me know if you have more questions.  
Best,  
Vincent

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [February 4, 2022, 12:20am UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/13 "2022-02-04T00:20:51Z")

</div>

Hi,

1. We have pushed the latest code into production. So it should be working in normal URL
2. Still investigating why the contents do not match.
3. We have a [Discord](https://cdn.builder.io/api/v1/qwik/page/cb79fc0021744663b043574c29ea26fe?apiKey=f682923328d54516b4ba21bfabd7faad&cachebust=true) where I may be able to answer these questions in more realtime if you are interested.

– misko

---

<div class="post-metadata">

**Author:** ![vperrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/vperrin/32/196_2.png) [@vperrin](https://forum.builder.io/u/vperrin)\
**Post date:** [February 4, 2022, 6:44am UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/14 "2022-02-04T06:44:25Z")

</div>

Hi @Misko ,

Thanks for getting back to me, excellent news.  
Happy to join on Discord, the link you have provided seems a QWIK endpoint though. If you can provide the right one we can meet there.

Best,  
Vincent

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [February 4, 2022, 4:55pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/15 "2022-02-04T16:55:42Z")

</div>

Oops: [Builder.io OSS: Mitosis + Partytown + Qwik](https://discord.gg/6DzjRwbW) =\> Qwik-API / General

---

<div class="post-metadata">

**Author:** ![vperrin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/vperrin/32/196_2.png) [@vperrin](https://forum.builder.io/u/vperrin)\
**Post date:** [February 4, 2022, 8:18pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/16 "2022-02-04T20:18:55Z")

</div>

Thanks, I’ve joined if you have any questions.

Vincent

---

<div class="post-metadata">

**Author:** ![Misko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/misko/32/677_2.png) [@Misko](https://forum.builder.io/u/Misko)\
**Post date:** [February 10, 2022, 11:49pm UTC](https://forum.builder.io/t/internal-server-error-when-using-qwik-api/1473/17 "2022-02-10T23:49:26Z")

</div>

Good news, it is now working in QA: [https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=%2F&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML](https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=%2F&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML)  
And production should have it later today [https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=%2F&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML](https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=%2F&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML)
