jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <n...@apache.org>
Subject Re: SwiftApi ObjectApi.put behavior on 4xx/5xx responses
Date Wed, 10 Dec 2014 16:33:51 GMT
I see what you say, Daniel.

The returned value has changed. Old swift API was using the
ParseETagHeader class [1] to parse the response for the putObject
request, but the new one is using the ETagHeader class [2] for that
purpose. The former threw an exception if the etag wasn't present but
the latter just silently returns null.

I don't know if that behavior change is intentional or not. Perhaps
some more afmiliar with the Swift API than me can give some light
here. Jeremy?


Thanks for sharing!

Ignasi


[1] https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/http/functions/ParseETagHeader.java
[2] https://github.com/jclouds/jclouds/blob/master/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ETagHeader.java

On 10 December 2014 at 17:10, Everett Toews <everett.toews@rackspace.com> wrote:
> I’m not exactly sure what feature you’re requesting at this point. From
> reading your original question I’d think that the following code would
> handle it.
>
> HttpResponseException.getResponse().getStatusCode()
>
> If you’d like to request a feature, you can head over to JIRA [1] and create
> an issue. Please include example code of how you’d like the feature to work.
>
> If you’d like to contribute a feature, read over How to Contribute [2].
>
> Regards,
> Everett
>
> [1] https://issues.apache.org/jira/browse/JCLOUDS
> [2] https://cwiki.apache.org/confluence/display/JCLOUDS/How+to+Contribute
>
>
> On Dec 10, 2014, at 9:33 AM, Daniel Hsueh <daniel.hsueh@seagate.com> wrote:
>
> I'm aware of using logging to see the full exchange.
>
> What I was more interested in was programatically determining what a problem
> is.
>
> Could we request this as a feature?  The HttpResponseException class seems
> perfect for this kind of reporting.
>
> On Wed, Dec 10, 2014 at 9:55 AM, Everett Toews <everett.toews@rackspace.com>
> wrote:
>>
>> Enable logging to see the full request/response and the status codes.
>>
>> http://jclouds.apache.org/reference/logging/
>>
>> Everett
>>
>>
>> On Dec 10, 2014, at 7:58 AM, Daniel Hsueh <daniel.hsueh@seagate.com>
>> wrote:
>>
>> Hello,
>>
>> Using the new openstack-swift API, I believe the ObjectApi.put() call
>> always returns an etag, or null, if a response is received.  There seems no
>> way to get an HttpResponseException to see a 4xx/5xx response code, yes?
>>
>> --
>> Daniel Hsueh -- mailto:daniel.hsueh@seagate.com tel:+1-905-287-2167
>>
>>
>
>
>
> --
> Daniel Hsueh -- mailto:daniel.hsueh@seagate.com tel:+1-905-287-2167
>
>

Mime
View raw message