I was using a URLConnection to go to a URL which essentially submitted a request onto a server for analysis of my query , and then I get a reference number from that URL to go to another one for the results.
For whatever reason at random times I get this error
java.io.IOException: Server returned HTTP response code: 502 for URL: http://www.....
I just wanted advice on whether bypassing the entire run of the program by using HttpURLConnection and getting the response code was the only and ideal solution to prevent this.
