title: Hystrix and Custom Exception
body: <p>I have a service layer interface that looks like this:</p>
  
  <pre><code>public interface MyService {
      void save(DomainClass domainObject) throws MyServiceException;
  }
  </code></pre>
  
  <p>I use Hystrix to protect the implementation method:</p>
  
  <pre><code>public class MyServiceImpl implements MyService {
      @HystrixCommand
      public void save(DomainClass domainObject) throws MyServiceException {
          remoteServiceClient.persist(domainObject);
      }
  }
  </code></pre>
  
  <p>When the <code>remoteServiceClient</code> fails or times out, Hystrix throws <code>HystrixRuntimeException</code>. But I do not want the clients of the service to see any Hystrix related exceptions (they should be oblivious to the implementation details of the service, right?). I want to throw my <code>MyServiceException</code> checked exception. Is it possible to do that? Should I structure my implementation in a different way?</p>