Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/com/box/sdk/BinaryBodyUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ private static long getContentLengthFromAPIResponse(BoxAPIResponse response) {

if (headerValue != null) {
try {
length = Long.parseLong(headerValue);
length = Long.parseLong(headerValue.trim());
} catch (NumberFormatException e) {
throw new RuntimeException("Invalid content length: " + headerValue);
throw new RuntimeException("Invalid content length: " + headerValue.trim() + " with: "
+ headerValue.trim().length() + " number of characters.");
}
}
}
Expand Down
Loading