# Internal Server Error Caused by Some Numbers in Calling SDK

**URL:** <https://community.hubspot.com/t/internal-server-error-caused-by-some-numbers-in-calling-sdk/121684>\
**Category:** APIs & Integrations\
**Tags:** sdk\
**Created:** [December 2, 2024, 6:37am UTC](https://community.hubspot.com/t/internal-server-error-caused-by-some-numbers-in-calling-sdk/121684 "2024-12-02T06:37:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadat](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Sadat](https://community.hubspot.com/u/Sadat)\
**Post date:** [December 2, 2024, 6:37am UTC](https://community.hubspot.com/t/internal-server-error-caused-by-some-numbers-in-calling-sdk/121684/1 "2024-12-02T06:37:41Z")

</div>

While using the calling-extension SDK, some numbers cause a “ **500** internal server error” to occur on incoming calls when they are set in the ‘_toNumber_’ field.  
This is different from a “ **400** bad request” error which occurs if the number itself is invalid. Also this only occurs on the ‘_toNumber_’, but not the ‘_fromNumber_’ field.  
An example of the numbers I’m using that cause this are “+6909602” and “+690222”.  
My use case is that I’m using “+690” as a placeholder with 4-digit or shorter IP extension numbers, as a workaround to country code validation being enforced by HS.

![Sadat_0-1733120902232.png](https://d2qpr2jzcazej7.cloudfront.net/optimized/3X/6/9/690226a3f90976627149ec6a79cc08e22cf25101_2_690x14.png)

 ![Sadat_1-1733120921459.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/f/af11bcf84ee2e0ac7ab9bd6f73d4b3172c41caf7.png)

 ![Sadat_2-1733121571674.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/d/d913dc17d167f660b58bcb9c46108f75fefc5241.png)

---

<div class="post-metadata">

**Author:** ![Sadat](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Sadat](https://community.hubspot.com/u/Sadat)\
**Post date:** [December 2, 2024, 11:59am UTC](https://community.hubspot.com/t/internal-server-error-caused-by-some-numbers-in-calling-sdk/121684/2 "2024-12-02T11:59:26Z")

</div>

This happens in both `_incomingCall()_` and `_outgoingCall()_`, only in the `_fromNumber_` field of both.

---

<div class="post-metadata">

**Author:** ![Sadat](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Sadat](https://community.hubspot.com/u/Sadat)\
**Post date:** [December 3, 2024, 1:27pm UTC](https://community.hubspot.com/t/internal-server-error-caused-by-some-numbers-in-calling-sdk/121684/3 "2024-12-03T13:27:36Z")

</div>

[@BérangèreL](https://community.hubspot.com/t5/user/viewprofilepage/user-id/230185) As you’ve kindly replied to related posts before, could you do the same with this one, please? 🙏  
And do let me know if there are better ways to get a reply on similar issues.

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [December 3, 2024, 3:07pm UTC](https://community.hubspot.com/t/internal-server-error-caused-by-some-numbers-in-calling-sdk/121684/4 "2024-12-03T15:07:43Z")

</div>

Hi @Sadat,  
Thanks for asking the Community and thanks for tagging me 🤗  
I’d love to put you in touch with some of our Top Experts and Community Members:  
Hi [@HubSpot\_Corey](https://community.hubspot.com/t5/user/viewprofilepage/user-id/580930), [@zach\_threadint](https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811), @DDajac, [@TDev\_](https://community.hubspot.com/t5/user/viewprofilepage/user-id/829663), @JeroenCloudCTI, @JSilva66, @myera and @Bortami do you have suggestions to help @Sadat, please?  
Thanks so much ❤ and have a great day!

Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![Sadat](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@Sadat](https://community.hubspot.com/u/Sadat)\
**Post date:** [December 6, 2024, 12:37pm UTC](https://community.hubspot.com/t/internal-server-error-caused-by-some-numbers-in-calling-sdk/121684/5 "2024-12-06T12:37:15Z")

</div>

Turns out that besides country code validation, HubSpot also enforces area code validation. If the area code is invalid, a 500 error is thrown.  
This should probably be fixed to throw 400, indicating that the input number was invalid for the above reason.
