No response from target url

Updated 5 months ago by Rahul Lahiri

Error message

Could not get any response. There was an error connecting: TypeError: Failed to fetch.

There are a few possible reasons why you may get this error.

Host not defined

You will get this error message if the host is not defined in your request. Depending on the source you used to load the request, the host may not be automatically populated. In this case, either add the host in the address bar, or add an environment variable that populates the host from the current environment.

Environment variable incorrectly configured

If you are using an environment variable, such as {{{url}}}, to specify the host, the variable is incorrectly configured. The url variable needs to be configured correctly when API Studio sends requests using this variable. If the configuration is incorrect, then you will see the following error:

Incorrect port

Another potential reason could be that your service is not listening on the localhost port where you might be expecting it to. For example, when you start the service with “run as” in Ecplise, it usually starts the tomcat service on port 8080. Sometimes, it may not. In that case, restarting the service to listen on port 8080 or configuring the url variable to point to the correct port will fix the issue.

How did we do?