I am pretty new to the node.js (I just started learning it two or three weeks ago) and I recently want to make a request to an API. When I run the runkit notebook directly (without endpoint) which uses “Request” npm, the request is always carried out. However, when I tried to export the endpoint and run the same notebook using the endpoint url, the notebook returns what is supposed to be returned but without carrying out the request. So, I tried refreshing the page (with endpoint url) and on the third time, the request is carried out without a problem. Next, I waited some time before refreshing again, and this shows up.
“message”: “Something unexpected happened. Please contact email@example.com. Please provide the case number 1e95234e-1af0-47ba-927b-b6acca713a2f”
When I looked into the endpoint log of the notebook, I found the error “socket hung up”. Since I am quite new to the node.js, I don’t know whether this is my fault or a bug in the runkit request. If this is my fault, how can I make an API request from the endpoint without having to reload three times before it works?
Edit: I tried refreshing my notebook endpoint page multiple times. Seems like the request is carried out starting from the third refresh. If I wait some time before refreshing, I have to refresh 3 times again for the request to be carried out.