[ https://issues.apache.org/jira/browse/OLTU-207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16297136#comment-16297136 ]
Nadia Guerras commented on OLTU-207: ------------------------------------ Yes... > Error in responseCode > --------------------- > > Key: OLTU-207 > URL: https://issues.apache.org/jira/browse/OLTU-207 > Project: Apache Oltu > Issue Type: Bug > Components: oauth2-client > Affects Versions: oauth2-1.0.2 > Reporter: Nadia Guerras > Original Estimate: 672h > Remaining Estimate: 672h > > I'm using the api and I am having problems with responseCode in > URLConnectionClient, > if ((responseCode == 400) || (responseCode == 401)) > inputStream = httpURLConnection.getErrorStream(); > else { > inputStream = httpURLConnection.getInputStream(); > } > If responseCode=500 then I have to use httpURLConnection.getErrorStream(); > Can we use something like this:? > if (httpConn.getResponseCode() >= 400) { > _is = httpConn.getInputStream(); > } else { > /* error from server */ > _is = httpConn.getErrorStream(); > } > There are other frameworks that ask if httpConn.getErrorStream()!=null. -- This message was sent by Atlassian JIRA (v6.4.14#64029)