File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
datashare-tasks/src/main/java/org/icij/datashare/asynctasks/temporal Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -166,10 +166,18 @@ private static boolean hasNamespace(WorkflowServiceGrpc.WorkflowServiceBlockingS
166166
167167 private static boolean namespaceIsReady (OperatorServiceGrpc .OperatorServiceBlockingStub operatorServiceBlockingStub ,
168168 String namespace ) {
169- Set <String > searchAttributes = operatorServiceBlockingStub
170- .listSearchAttributes (ListSearchAttributesRequest .newBuilder ().setNamespace (namespace ).build ())
171- .getCustomAttributesMap ()
172- .keySet ();
169+ Set <String > searchAttributes ;
170+ try {
171+ searchAttributes = operatorServiceBlockingStub
172+ .listSearchAttributes (ListSearchAttributesRequest .newBuilder ().setNamespace (namespace ).build ())
173+ .getCustomAttributesMap ()
174+ .keySet ();
175+ } catch (StatusRuntimeException e ) {
176+ if (!e .getStatus ().getCode ().equals (Status .Code .NOT_FOUND ) && !e .getStatus ().getCode ().equals (Status .Code .FAILED_PRECONDITION )) {
177+ throw e ;
178+ }
179+ return false ;
180+ }
173181 return searchAttributes .containsAll (CUSTOM_SEARCH_ATTRIBUTES .keySet ());
174182 }
175183
You can’t perform that action at this time.
0 commit comments