Handling a webexception and webresponse in NAV

Hi,

Can anyone help and answer the attached link ( https://dynamicsuser.net/nav/f/developers/94383/dotnet-handling-for-web-requests)? I still need an answer because whenever there is a valid error to encounter, I am stuck in receiving the below error.

code.jpg

How can I get the exact error message below from NAV?

Just check your request, because the 500 is Internal Server Error [RFC7231, Section 6.6.1] ( https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml )

This Error means System is even unable to do the Handshake between the API’S.