msgraph-sdk-java icon indicating copy to clipboard operation
msgraph-sdk-java copied to clipboard

Body missing in ApiException

Open coinzz opened this issue 9 months ago • 0 comments

Is your feature request related to a problem? Please describe the problem.

In v6 I am missing a method to get the body of a failed request, which may help to reproduce an issue.

With v5 I'm able to call graphServiceException.getMessage(true); which contains the headers and body of the failed request. However in v6 there is a method for the headers apiException.getResponseHeaders(), but none for the body.

Question on that: Are these really the responseHeaders and not the requestHeaders of the failed request? I don't see why someone would need the headers of the response message. So maybe this case is just a naming issue.

Describe the solution you'd like.

Add method getRequestBody or getResponseBody analogue to getRequestHeaders or getResponseHeaders

Additional context?

No response

coinzz avatar Mar 03 '25 11:03 coinzz