Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Commit

Permalink
make resty not throw an exception for non-200 responses
Browse files Browse the repository at this point in the history
  • Loading branch information
peet committed Aug 20, 2014
1 parent 386fb39 commit 201680b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/us/monoid/web/AbstractResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ void fill(URLConnection anUrlConnection) throws IOException {
baos.write(buf, 0, read);
}
} catch (IOException e1) {
log.warning("IOException when reading the error stream. Igored");
log.warning("IOException when reading the error stream. Ignored");
}

// close the errorstream
es.close();

throw new IOException("Error while reading from " + conn.getRequestMethod() + ": [" + conn.getResponseCode() + "] "
+ conn.getResponseMessage() + "\n" + new String(baos.toByteArray(), "UTF-8"), e);
inputStream = new ByteArrayInputStream(baos.toByteArray());

} else {
throw e;
}
Expand Down

2 comments on commit 201680b

@hbakkum
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

Any idea when the 0.3.3 release will be made containing this change - would really like it.

Thanks,
Hayden

@beders
Copy link
Owner

@beders beders commented on 201680b Nov 15, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.