test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/exception/TDPExceptionUtilsTest.java
test_class.identifier: TDPExceptionUtilsTest
test_case.body: @Test
      public void shouldExtractTDPException() {
          // given
          TDPException expected = new TDPException(UNABLE_TO_CONNECT_TO_STREAMS);
          final HystrixRuntimeException hre = new HystrixRuntimeException( //
                  BAD_REQUEST_EXCEPTION, //
                  TestHystrixCommand.class, //
                  "hello", //
                  new Exception("middle", expected), //
                  new Throwable("fallback")//
          );
  
          // when
          final TDPException tdpException = TDPExceptionUtils.processHystrixException(hre);
  
          // then
          assertNotNull(tdpException);
          assertEquals(UNABLE_TO_CONNECT_TO_STREAMS, tdpException.getCode());
      }
test_case.class_method_signature: TDPExceptionUtilsTest.shouldExtractTDPException()
test_case.full_signature: @Test public void shouldExtractTDPException()
test_case.identifier: shouldExtractTDPException
test_case.invocations: processHystrixException assertNotNull assertEquals getCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldExtractTDPException()
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/exception/TDPExceptionUtils.java
focal_class.identifier: TDPExceptionUtils
focal_class.class_method_signature: TDPExceptionUtils.TDPExceptionUtils()
focal_class.full_signature: private  TDPExceptionUtils()
focal_class.identifier: TDPExceptionUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  TDPExceptionUtils()
focal_class.class_method_signature: TDPExceptionUtils.processHystrixException(HystrixRuntimeException hre)
focal_class.full_signature: static TDPException processHystrixException(HystrixRuntimeException hre)
focal_class.identifier: processHystrixException
focal_class.modifiers: static
focal_class.parameters: (HystrixRuntimeException hre)
focal_class.return: TDPException
focal_class.signature: TDPException processHystrixException(HystrixRuntimeException hre)
focal_method.body: static TDPException processHystrixException(HystrixRuntimeException hre) {
          // filter out hystrix exception level if possible
          Throwable e = hre;
          TDPException innerMostTDPException = null;
          while (e.getCause() != null) {
              e = e.getCause();
              if (e instanceof TDPException) {
                  innerMostTDPException = (TDPException) e;
              }
          }
          if (innerMostTDPException != null) {
              return innerMostTDPException;
          } else {
              return new TDPException(CommonErrorCodes.UNEXPECTED_SERVICE_EXCEPTION, hre);
          }
      }
focal_method.class_method_signature: TDPExceptionUtils.processHystrixException(HystrixRuntimeException hre)
focal_method.full_signature: static TDPException processHystrixException(HystrixRuntimeException hre)
focal_method.identifier: processHystrixException
focal_method.invocations: getCause getCause
focal_method.modifiers: static
focal_method.parameters: (HystrixRuntimeException hre)
focal_method.return: TDPException
focal_method.signature: TDPException processHystrixException(HystrixRuntimeException hre)