APIs & Integrations

Sadat
Contributor

Internal Server Error Caused by Some Numbers in Calling SDK

SOLVE

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

Sadat_1-1733120921459.png

Sadat_2-1733121571674.png

 

 

0 Upvotes
1 Accepted solution
Sadat
Solution
Contributor

Internal Server Error Caused by Some Numbers in Calling SDK

SOLVE

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.

View solution in original post

0 Upvotes
4 Replies 4
Sadat
Contributor

Internal Server Error Caused by Some Numbers in Calling SDK

SOLVE

@BérangèreL 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.

0 Upvotes
Sadat
Solution
Contributor

Internal Server Error Caused by Some Numbers in Calling SDK

SOLVE

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.

0 Upvotes
BérangèreL
Community Manager
Community Manager

Internal Server Error Caused by Some Numbers in Calling SDK

SOLVE

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, @zach_threadint, @DDajac, @TDev_, @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


Saviez-vous que la Communauté est disponible en Français ?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings!


0 Upvotes
Sadat
Contributor

Internal Server Error Caused by Some Numbers in Calling SDK

SOLVE

This happens in both `incomingCall()` and `outgoingCall()`, only in the `fromNumber` field of both.

0 Upvotes