You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node cash when Restclient tried to parse invalid json #16
Hi @quanle1996 , I'm on the Product team here at Telesign, and would love to learn more about the issue you are raising here. I'm not sure I understand fully yet though. Could you explain to me further what you are seeing and what is the behavior you would expect to see instead? Thanks!
Activity
kwanLeeFrmVi commentedon Mar 8, 2024
P/s: this could happen when I init class Telesign with in-correct restEndpoint arg
aidanatwork commentedon Mar 11, 2024
Hi @quanle1996 , I'm on the Product team here at Telesign, and would love to learn more about the issue you are raising here. I'm not sure I understand fully yet though. Could you explain to me further what you are seeing and what is the behavior you would expect to see instead? Thanks!
kwanLeeFrmVi commentedon Mar 12, 2024
Hi @aidanatwork,
I accidentally set restEndpoint = 'https://rest-api.telesign.com'
instead of 'https://rest-ww.telesign.com/v1'
in
this causes an un-catch exception at runtime.
this should be catch at
node_modules/telesignsdk/src/RestClient.jsrow :185as following
because bodyStr could be an invalid json so JSON.parse would throw error
aidanatwork commentedon Mar 12, 2024
Thanks @kwanLeeFrmVi , I'll report this to our SDK team.