# 503 error from a specific service

**URL:** <https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977>\
**Category:** Questions\
**Created:** [September 24, 2020, 11:41am UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977 "2020-09-24T11:41:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![yurivaskovski](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yurivaskovski](https://developer.squareup.com/forums/u/yurivaskovski)\
**Post date:** [September 24, 2020, 11:41am UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/1 "2020-09-24T11:41:46Z")

</div>

Hi there,

I am using a backend service that makes API calls on my behalf. About 9-10 days ago all of the API requests were fine and returned a result but starting yesterday any time I try to make an API request to my sandbox account it gets aborted with `Not valid http result json(upstream connect error or disconnect/reset before headers. reset reason: connection termination)`

At the same time, I can make the same request with Postman/Insomnia, and this backend service also is successful making API requests to other services besides Square. It looks like Square does not allow requests from their IPs anymore? Is that even a possibility or a probability? Their customer support is saying that based on their logs it looks like the connection is terminated from your end.

Thank you

P.S. I attached a screenshot showing what’s going on from my end on the service I’m using.

 ![screen](https://global.discourse-cdn.com/square/original/1X/ce719347741267b1793b83896029d4af40a47055.png)

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [September 24, 2020, 3:41pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/2 "2020-09-24T15:41:35Z")

</div>

Hi @yurivaskovski welcome to the forums!

Could you please provide your Square application id and I’ll take a look at the logs on our side?

---

<div class="post-metadata">

**Author:** ![yurivaskovski](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yurivaskovski](https://developer.squareup.com/forums/u/yurivaskovski)\
**Post date:** [September 24, 2020, 3:46pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/3 "2020-09-24T15:46:08Z")

</div>

sure  
it’s sandbox-sq0idb-LcbyK7Z895QfcYFrTRDp8A

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [September 24, 2020, 4:03pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/4 "2020-09-24T16:03:02Z")

</div>

Is the issue still occurring? In our logs from today I’m only seeing status code 200 for `SearchCatalogObjects` with that sandbox app id. There was one 400 ("“Expected body to be a JSON object.”"), but then only 200s afterward.

---

<div class="post-metadata">

**Author:** ![yurivaskovski](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yurivaskovski](https://developer.squareup.com/forums/u/yurivaskovski)\
**Post date:** [September 24, 2020, 4:06pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/5 "2020-09-24T16:06:38Z")

</div>

i just tried a few minutes ago to see if the problem still occurs and it got aborted with the same error. so, what are you saying is that those bad requests I’m having haven’t even reached your servers?

200s are from insomnia/postman testing

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [September 24, 2020, 4:15pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/6 "2020-09-24T16:15:02Z")

</div>

Ah sorry I misread; in that case, yes I’m not seeing any hit our servers. The last 200 was about 2 hours and 40 minutes ago, and I do not see another `SearchCatalogObjects` request at all since then.

---

<div class="post-metadata">

**Author:** ![yurivaskovski](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yurivaskovski](https://developer.squareup.com/forums/u/yurivaskovski)\
**Post date:** [September 24, 2020, 4:16pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/7 "2020-09-24T16:16:24Z")

</div>

yeah, the 200s are the ones made from insomnia/postman which were made around that time. great, thank you for checking your logs, that just proves that there is nothing wrong on your end as I thought. thanks a lot

---

<div class="post-metadata">

**Author:** ![yurivaskovski](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yurivaskovski](https://developer.squareup.com/forums/u/yurivaskovski)\
**Post date:** [September 25, 2020, 11:42am UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/8 "2020-09-25T11:42:37Z")

</div>

hi again,

so the problem was with headers. the service i’m using is built on Erlang and it seems like after a recent update of Square, i now have to include a header “te” to make that request work and not be rejected on your end. i’m curious what might’ve changed that now required this header to be sent.

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [September 28, 2020, 3:36pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/9 "2020-09-28T15:36:43Z")

</div>

Apologies for the delay. Let me check in with some teams on my end, I haven’t heard of anyone needing to add a “te” header. Can you confirm what all endpoints you were hitting besides `SearchCatalogObjects` that needed this header?

---

<div class="post-metadata">

**Author:** ![yurivaskovski](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yurivaskovski](https://developer.squareup.com/forums/u/yurivaskovski)\
**Post date:** [October 11, 2020, 12:11am UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/10 "2020-10-11T00:11:05Z")

</div>

Hi Stephen,

Sorry for such a long response time. I am using it for Catalog, Payments, Orders, Customers. So, basically, it didn’t matter which endpoint I was using.

Since then, I also have another question:  
Could you please help me out with a pattern or a Regex for “uid” parameter of a line item in an order? Thank you

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [October 12, 2020, 3:36pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/11 "2020-10-12T15:36:30Z")

</div>

Thanks for the info, I’ll see if our teams know anything about this header.

Not sure about the regex. As far as I know we do not guarantee any specific format or length on those ids.

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [October 19, 2020, 9:34pm UTC](https://developer.squareup.com/forums/t/503-error-from-a-specific-service/977/12 "2020-10-19T21:34:04Z")

</div>

Hi @yurivaskovski we still haven’t been able to find anything on our end. We have no evidence that a `te` header should ever be required. If you’re able to test again, would you be able to trace what your Erlang service is sending us to see if it’s vastly different than Postman?
