@@ -568,33 +568,45 @@ public ListWorkflowExecutionsResponse ScanWorkflowExecutions(
568
568
ListWorkflowExecutionsRequest listRequest )
569
569
throws BadRequestError , EntityNotExistsError , ServiceBusyError ,
570
570
ClientVersionNotSupportedError , TException {
571
- com .uber .cadence .api .v1 .ScanWorkflowExecutionsResponse response =
572
- grpcServiceStubs
573
- .visibilityBlockingStub ()
574
- .scanWorkflowExecutions (RequestMapper .scanWorkflowExecutionsRequest (listRequest ));
575
- return ResponseMapper .scanWorkflowExecutionsResponse (response );
571
+ try {
572
+ com .uber .cadence .api .v1 .ScanWorkflowExecutionsResponse response =
573
+ grpcServiceStubs
574
+ .visibilityBlockingStub ()
575
+ .scanWorkflowExecutions (RequestMapper .scanWorkflowExecutionsRequest (listRequest ));
576
+ return ResponseMapper .scanWorkflowExecutionsResponse (response );
577
+ } catch (StatusRuntimeException e ) {
578
+ throw ErrorMapper .Error (e );
579
+ }
576
580
}
577
581
578
582
@ Override
579
583
public CountWorkflowExecutionsResponse CountWorkflowExecutions (
580
584
CountWorkflowExecutionsRequest countRequest )
581
585
throws BadRequestError , EntityNotExistsError , ServiceBusyError ,
582
586
ClientVersionNotSupportedError , TException {
583
- com .uber .cadence .api .v1 .CountWorkflowExecutionsResponse response =
584
- grpcServiceStubs
585
- .visibilityBlockingStub ()
586
- .countWorkflowExecutions (RequestMapper .countWorkflowExecutionsRequest (countRequest ));
587
- return ResponseMapper .countWorkflowExecutionsResponse (response );
587
+ try {
588
+ com .uber .cadence .api .v1 .CountWorkflowExecutionsResponse response =
589
+ grpcServiceStubs
590
+ .visibilityBlockingStub ()
591
+ .countWorkflowExecutions (RequestMapper .countWorkflowExecutionsRequest (countRequest ));
592
+ return ResponseMapper .countWorkflowExecutionsResponse (response );
593
+ } catch (StatusRuntimeException e ) {
594
+ throw ErrorMapper .Error (e );
595
+ }
588
596
}
589
597
590
598
@ Override
591
599
public GetSearchAttributesResponse GetSearchAttributes ()
592
600
throws ServiceBusyError , ClientVersionNotSupportedError , TException {
593
- com .uber .cadence .api .v1 .GetSearchAttributesResponse response =
594
- grpcServiceStubs
595
- .visibilityBlockingStub ()
596
- .getSearchAttributes (GetSearchAttributesRequest .newBuilder ().build ());
597
- return ResponseMapper .getSearchAttributesResponse (response );
601
+ try {
602
+ com .uber .cadence .api .v1 .GetSearchAttributesResponse response =
603
+ grpcServiceStubs
604
+ .visibilityBlockingStub ()
605
+ .getSearchAttributes (GetSearchAttributesRequest .newBuilder ().build ());
606
+ return ResponseMapper .getSearchAttributesResponse (response );
607
+ } catch (StatusRuntimeException e ) {
608
+ throw ErrorMapper .Error (e );
609
+ }
598
610
}
599
611
600
612
@ Override
0 commit comments