# Rest API - "Cannot read properties of null"

**URL:** <https://community.weweb.io/t/rest-api-cannot-read-properties-of-null/5478>\
**Category:** Ask us anything\
**Created:** [November 19, 2023, 11:39pm UTC](https://community.weweb.io/t/rest-api-cannot-read-properties-of-null/5478 "2023-11-19T23:39:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharonapicula](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sharonapicula](https://community.weweb.io/u/sharonapicula)\
**Post date:** [November 19, 2023, 11:39pm UTC](https://community.weweb.io/t/rest-api-cannot-read-properties-of-null/5478/1 "2023-11-19T23:39:30Z")

</div>

Hello,

I’m trying to use Rest API to get info from my db. However, I have this error  
**“Cannot read properties of null (reading ‘reduce’)”**

I get a response in Postman and in my browser, so its a Weweb problem.

- I also used “httpS”.
- My API is accessible WITHOUT credential
- I checked “Proxy the request to bypass CORS issues”

Nothing is working, I’m going crazy…I check the forum but I didn’t find any answer.

_Here how I set it up. I replaced the real URL for the screenshot but the one I’m using actually work_

 ![Screenshot from 2023-11-20 00-37-42](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/c42e13dba6dd80715da2a07789a37644dd64fb4f.png)

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [November 20, 2023, 8:37am UTC](https://community.weweb.io/t/rest-api-cannot-read-properties-of-null/5478/2 "2023-11-20T08:37:02Z")

</div>

Hi, I think your collection is corrupted, it’s a bug we caught last week and a fix should be released in two days.

Could you try to add and remove a header and a query string, by clicking on the blue button `Add item` for each parameters ?

---

<div class="post-metadata">

**Author:** ![sharonapicula](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@sharonapicula](https://community.weweb.io/u/sharonapicula)\
**Post date:** [November 20, 2023, 12:43pm UTC](https://community.weweb.io/t/rest-api-cannot-read-properties-of-null/5478/3 "2023-11-20T12:43:21Z")

</div>

Hi!

Its seems to be working! My error message is differents this time 😆

**“stack: “Error: self signed certificate at TLSSocket.onConnectSecure […]””**

But its on my part, I used a self-signed SSL certificate since its still not on production. Is there any way to go past that for now ?

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [November 20, 2023, 1:52pm UTC](https://community.weweb.io/t/rest-api-cannot-read-properties-of-null/5478/4 "2023-11-20T13:52:23Z")

</div>

Nice 🙂

Maybe try to replace https with http

---

<div class="post-metadata">

**Author:** ![ativuspcp](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@ativuspcp](https://community.weweb.io/u/ativuspcp)\
**Post date:** [November 24, 2023, 2:30pm UTC](https://community.weweb.io/t/rest-api-cannot-read-properties-of-null/5478/5 "2023-11-24T14:30:22Z")

</div>

I’m having the same problem about the certificate, is there a way to bypass this certificate check?

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/78a5a017d48a93ba8cc02eedf26fb838cf0dc8cb.png)

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [November 24, 2023, 5:08pm UTC](https://community.weweb.io/t/rest-api-cannot-read-properties-of-null/5478/6 "2023-11-24T17:08:16Z")

</div>

The browser is blocking insecure request.

If its for building purpose you can try to open the url in a new tab first, the browser will ask you if you agree to access this website for security check, once confirmed it should probably works.

If its for your published website, you may have to toggle proxy so we will make the request server side instead.
