jumblr icon indicating copy to clipboard operation
jumblr copied to clipboard

jumblr: Get avatar for blog. RequestBuilder.getRedirectUrl(path) throws JumblrException (response code 302. not 301)

Open sergeyinsart opened this issue 7 years ago • 1 comments

When trying to get avatar for specific blog we always get Jumblr exception here (even though response contains correct Location header):

if(response.getCode() == 301) { return response.getHeader("Location"); } else { throw new JumblrException(response); }

as response code is 302. not 301.

Stack trace: Caused by: com.tumblr.jumblr.exceptions.JumblrException: Found at com.tumblr.jumblr.request.RequestBuilder.getRedirectUrl(RequestBuilder.java:49) at com.tumblr.jumblr.JumblrClient.blogAvatar(JumblrClient.java:271) at com.tumblr.jumblr.types.Blog.avatar(Blog.java:89) at com.tumblr.jumblr.types.Blog.avatar(Blog.java:93)

sergeyinsart avatar Sep 17 '17 17:09 sergeyinsart

Thank you for the report. We indeed updated the response code to 302 and need to update the library to match.

cc: @ceyko

komapa avatar Sep 17 '17 21:09 komapa