Package com.treasuredata.client
Class TDRequestErrorHandler
- java.lang.Object
-
- com.treasuredata.client.TDRequestErrorHandler
-
public class TDRequestErrorHandler extends Object
TDRequestErrorHandler has a logic to handle http request retris,
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TDClientException
defaultErrorResolver(Throwable e)
static TDClientException
defaultExceptionResolver(Exception e)
static TDClientException
defaultHttpResponseErrorResolver(TDHttpRequestHandler.ResponseContext responseContext)
static com.google.common.base.Optional<TDApiErrorMessage>
extractErrorResponse(okhttp3.Response response)
-
-
-
Method Detail
-
defaultHttpResponseErrorResolver
public static TDClientException defaultHttpResponseErrorResolver(TDHttpRequestHandler.ResponseContext responseContext) throws TDClientException
- Throws:
TDClientException
-
defaultErrorResolver
public static TDClientException defaultErrorResolver(Throwable e) throws TDClientException
- Throws:
TDClientException
-
defaultExceptionResolver
public static TDClientException defaultExceptionResolver(Exception e) throws TDClientException
- Returns:
- If the error type is retryable, return the exception. If not, throw it as TDClientException
- Throws:
TDClientException
-
extractErrorResponse
public static com.google.common.base.Optional<TDApiErrorMessage> extractErrorResponse(okhttp3.Response response)
-
-