# 502 Bad Gateway

**URL:** https://forum.social.plus/t/502-bad-gateway/634
**Category:** General
**Created:** [January 28, 2023, 11:05am UTC](https://forum.social.plus/t/502-bad-gateway/634 "2023-01-28T11:05:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Tech](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@Tech](https://forum.social.plus/u/Tech)
#### Post date: [January 28, 2023, 11:05am UTC](https://forum.social.plus/t/502-bad-gateway/634/1 "2023-01-28T11:05:41Z")

</div>

Hi Amity supporters,

I am using the TS version of Amity API to develop social features of my React Native application.

I have implemented a share post feature that users can attach an image on it, It works sometimes and it doesn’t sometimes :).

When I tried to upload an image and submit a post, I got this error from my console:

```auto
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>

```

Can someone help me to figure out this HTTP error?

---

<div class="post-metadata">

### Author: ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)
#### Post date: [January 30, 2023, 6:38am UTC](https://forum.social.plus/t/502-bad-gateway/634/2 "2023-01-30T06:38:53Z")

</div>

Hello, May I know your app region and your current version, please? Could we see your code as well? :))

---

<div class="post-metadata">

### Author: ![Tech](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@Tech](https://forum.social.plus/u/Tech)
#### Post date: [January 30, 2023, 7:35pm UTC](https://forum.social.plus/t/502-bad-gateway/634/3 "2023-01-30T19:35:59Z")

</div>

Hi @SocialPlus_Support,

Yes, here it is:

```auto
export const connectToAmity = () => {
  createClient(valueConstant.amity.apiKey, API_REGIONS.US);
  enableCache();
};

```

---

<div class="post-metadata">

### Author: ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)
#### Post date: [February 1, 2023, 4:20am UTC](https://forum.social.plus/t/502-bad-gateway/634/4 "2023-02-01T04:20:35Z")

</div>

Hello @Tech are you still facing this? could you please provide the timestamps when this error arises?

---

<div class="post-metadata">

### Author: ![Tech](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@Tech](https://forum.social.plus/u/Tech)
#### Post date: [February 8, 2023, 12:08pm UTC](https://forum.social.plus/t/502-bad-gateway/634/5 "2023-02-08T12:08:27Z")

</div>

Hello @SocialPlus_Support .  
Fortunately, I can not see that error anymore and everything is working well.
