sharing/rest/oauth2/token is timing out (socket hang up error)

02-20-2020 06:10 AM
New Contributor II


I've created an endpoint to generate a token using the instructions I found online.  

I use a https request in Nodejs, i've tried both GET and POST. It works fine on my navigator but i keep getting the same error from my terminal console or from lambda functions: 

{ Error: socket hang up
at createHangUpError (_http_client.js:323:15)
at TLSSocket.socketOnEnd (_http_client.js:426:23)
at TLSSocket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET' }

Anyone knows what's going on ? Do i need to whitelist the domain or something?

0 Kudos
1 Reply
Esri Contributor

Are you seeing this error message on your server or client? If you are seeing it on the client, it usually means the request timed out. I would suggest catching the error and retrying. If you are seeing this from the server it usually means the client canceled the request, which wouldn't make sense in this situation since you are the client as well.

Does it work with http?

0 Kudos