Product/components used and version/fix level are you on:
Detailed explanation of the problem:
Hi Sometimes When I am calling any post API or a get API through postman, I get a error like this or sometimes I get ErrNotFound something like this I am not sure, I don’t have any image of that right now. When I again hit send on postman it works fine. So, is this an expected behavior from cumulocity side? This error I got when I was hitting M.O API in my java code, maybe next time I will capture some images from postman as well if I receive it someday but can you provide any solution regarding this like why is it happening?
<head><title>502 Bad Gateway</title></head>
<center><h1>502 Bad Gateway</h1></center>
I can’t send screenshots because as I said the error was from my java code and it was produced in console. Maybe later on if I get from postman side, I can send the screenshots. Do you know what the issue could be? any idea?
Okay, but is there any fix regarding this? or do I have to handle this in my code only? For the first case 502 Bad Gateway, I can handle that but for ERRNOTFOUND, there is no error code just an error on the console in postman. What can I do about that
Sometimes i am also getting a issue like this:
java.net.UnknownHostException: No such host is known (dev1.guardtec-dev.solenis.com)
in my java code, there might be a chance that I catch this error in postman as well but is this error expected or not? OR if its not known from cumulocity side then can it be a issue of SSL? I have disabled SSL in my code as well as in postman because or corporate firewall, so maybe that could be an issue?
UnknownHostException in Java means that your computer was unable to resolve the IP address for the host you are trying to access. This typically means that there is either a problem with your internet connection (temporary interruption) or the DNS server you are using to resolve the host name does not know it. The latter though, typically would only happen shortly after the host name was registered as it takes some time for this information to propagate.
As Herald suggested, I tried to make a same scenario and ERR Not Found is because of that only: No internet connection. That is fine but regarding the 502 Bad Gateway I need to check and try once from postman.
Sure Robert, Will try to create a scenario or maybe if I get the issue someday, I will post the screenshots. For now, thanks for the help