Alexander Kolbasov created SENTRY-1948:
------------------------------------------

             Summary: RetryClientInvocationHandler throws wrong exception up 
the stack
                 Key: SENTRY-1948
                 URL: https://issues.apache.org/jira/browse/SENTRY-1948
             Project: Sentry
          Issue Type: Bug
          Components: Sentry
    Affects Versions: 2.0.0
            Reporter: Alexander Kolbasov
            Assignee: Alexander Kolbasov


RetryClientInvocationHandler.invokeImpl() does this:

{code}
      } catch (InvocationTargetException e) {
        // Get the target exception, check if SentryUserException or 
TTransportException is wrapped.
        // TTransportException means there is a connection problem.
        LOGGER.error("failed to execute {}", method.getName(), e);
        Throwable targetException = e.getCause();
        if (!((targetException instanceof SentryUserException) ||
            (targetException instanceof SentryHdfsServiceException))) {
          throw e;   // <-- Here
        }
{code}

So, instead of throwing the original exception it throws the 
InvocationTargetException.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to