Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A 502 error means "Bad Gateway", indicating that the server acting as a gateway or proxy received an invalid response from the upstream server. In this case, when calling an HTTPS REST API from an HTTP REST API, there may be a mismatch in the protocols used.

To resolve this error, you can try:

  1. Verify that the HTTPS REST API is accessible and functioning properly. Check the API documentation or contact the API provider to confirm the endpoint URL and any required authentication parameters.

  2. Ensure that the correct port is being used for the HTTPS connection. By default, HTTPS communicates over port 443. Make sure that the port number in the API endpoint URL matches the port used by the HTTPS server.

  3. If the HTTP REST API is behind a firewall or proxy server, ensure that it is configured to allow outbound communication over HTTPS. You may need to configure the firewall or proxy server to allow the necessary ports and protocols for HTTPS communication.

  4. If the HTTPS REST API uses a self-signed SSL/TLS certificate, ensure that the certificate is trusted by the HTTP REST API. You may need to add the certificate to the trust store used by the HTTP server.

  5. Check the logs for both the HTTP REST API and the HTTPS REST API for any error messages or details that can help identify the root cause of the 502 error.

  6. If the issue persists, consider contacting technical support for both the HTTP REST API and the HTTPS REST API to investigate further.