jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Gaul <notificati...@github.com>
Subject Re: [jclouds/jclouds-labs] JCLOUDS-1005: Backblaze B2 skeleton and bucket ops (#270)
Date Tue, 24 May 2016 23:36:32 GMT
> +import org.jclouds.labs.b2.domain.B2Error;
> +
> +import com.google.inject.Inject;
> +import com.google.inject.TypeLiteral;
> +
> +public class ParseB2ErrorFromJsonContent extends ParseJson<B2Error> implements
HttpErrorHandler {
> +
> +   @Inject
> +   public ParseB2ErrorFromJsonContent(Json json) {
> +      super(json, TypeLiteral.get(B2Error.class));
> +   }
> +
> +   private static Exception refineException(B2Error error, Exception exception) {
> +      if ("bad_json".equals(error.code())) {
> +         return new IllegalArgumentException(error.message(), exception);
> +      } else {

Let's address this in the upcoming object pull request which will encounter 404 errors.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/270/files/8bb355e1b286b2bbf77fd8d3cb75cd2d1aa6bc69#r64493814
Mime
View raw message