OfficeDev / ews-java-api

A java client library to access Exchange web services. The API works against Office 365 Exchange Online as well as on premises Exchange.
MIT License
869 stars 560 forks source link

ServiceRequestBase.processWebException should use getResponseErrorStream rather than getResponseStream #441

Open mattguo opened 9 years ago

mattguo commented 9 years ago

ews-java-api/src/main/java/microsoft/exchange/webservices/data/core/request/ServiceRequestBase.java, Ln 503

if (this.service.isTraceEnabledFor(TraceFlags.EwsResponse)) {
    ...
    InputStream serviceResponseStream = ServiceRequestBase.getResponseErrorStream(req);
    ...
} else {
    InputStream serviceResponseStream = ServiceRequestBase.getResponseStream(req);
    ...
 }

I guess we should replace the getResponseStream with getResponseErrorStream.

serious6 commented 9 years ago

@mattguo will you provide a PR?