I'm using the SysHttpCommunicationClient to call a restful service and get a response. I get a HttpResponseMessage as expected when the call is successful but the response message is null on an unsuccessful call, such as a status 400 (bad request). Instead an exception of type System.Exception is being thrown.
There is a response message being sent back as I can see it in Postman. The response message contains information about what was wrong with the request, such as what field was invalid. I'd like to be able to get the response message on an error status so I can share the information with the user.
How can a the HttpResponsemessage when the service returns a status other than 200?