RemoteServerException always throws 500 Internal Server Error?

Viewed 46

I am trying to use RemoteServerException in my code like this:

throw new RemoteServerException(response.StatusCode,response.IsSuccessStatusCode,newUri("http://localhost:5045/myapi"),null,content);

but it always throws 500 instead of response.StatusCode that I set. why?

1 Answers

because it shows remote api's response in it's body like this image:enter image description here

Related