LWC – Apex Continuation Execution Failed and Did Not Start

continuationlightning-web-componentsrest-api

I am trying to make a POST api callout from my LWC using Apex Continuation and followed similar code: example. I have created the respective Remote Site settings too. The error message I am getting is:

{"status":500,"body":{"message":"The continuation execution failed. The actual exception is: The continuation execution did not start. Check Remote Site Settings for the callouts. It might also be a transient network problem. Please try again.."},"headers":{},"ok":false,"statusText":"Server Error","errorType":"fetchResponse"}

I already ran out of all the necessary checks I can think of:

  1. Verified the request JSON payload I am setting from my LWC.
  2. I've saved the endpoint on Custom label and I can see it via debug log
  3. Only thing I can think of from the URL is, it has the format: https://myRESTapiURL.com:11305/first/second/createpost/1.0.0.4

Having the integer(11305) in the endpoint could impact the Continuation? Anyways, I couldn't find any sources or troubleshooting mechanisms for the above error message. Can someone assist me here if faced similar issue? Or, if I am missing something silly here?

Best Answer

Seems like the issue was with the Remote Site settings where I had to include the endpoint as: https://myRESTapiURL.com:11305 to make API callout successful, instead of https://myRESTapiURL.com. I hope someone might get benefited with my answer if they ever had similar situation.

Related Topic