0

On api.sap.com, there are useable trial APIs. And I tried one of the POST Request samples. On this link SAP API Trial, I've used the Java Code Snippet they show on my locally created Java API.

On this Case, I am expecting an error like how it is shown when I run the trial on the link. enter image description here

As the code snippet for java on the link shows, it goes through the Catch part, catching the exception. What I want to do is access the "error.message.value" property of the response given to me. I tried using exception.getMessage(), or most of the options under the exception class, but it does not give me the expected content of the "value" property. I have also tried the suggestion on this link on how to read the full response. but it does not show what i want.

Is there a way to access it?

[edit]attaching the exception part of the code and the results I got. enter image description here

Ger
  • 17
  • 4

0 Answers0