@@ -227,7 +227,9 @@ public OrchestrationMetadata waitForInstanceStart(String instanceId, Duration ti
227227 throw new TimeoutException ("Start orchestration timeout reached." );
228228 }
229229 Exception translated = StatusRuntimeExceptionHelper .toException (e , "waitForInstanceStart" );
230- if (translated instanceof RuntimeException ) {
230+ if (translated instanceof TimeoutException ) {
231+ throw (TimeoutException ) translated ;
232+ } else if (translated instanceof RuntimeException ) {
231233 throw (RuntimeException ) translated ;
232234 }
233235 throw new RuntimeException (translated );
@@ -258,7 +260,9 @@ public OrchestrationMetadata waitForInstanceCompletion(String instanceId, Durati
258260 throw new TimeoutException ("Orchestration instance completion timeout reached." );
259261 }
260262 Exception translated = StatusRuntimeExceptionHelper .toException (e , "waitForInstanceCompletion" );
261- if (translated instanceof RuntimeException ) {
263+ if (translated instanceof TimeoutException ) {
264+ throw (TimeoutException ) translated ;
265+ } else if (translated instanceof RuntimeException ) {
262266 throw (RuntimeException ) translated ;
263267 }
264268 throw new RuntimeException (translated );
@@ -370,7 +374,9 @@ public PurgeResult purgeInstances(PurgeInstanceCriteria purgeInstanceCriteria) t
370374 throw new TimeoutException (timeOutException );
371375 }
372376 Exception translated = StatusRuntimeExceptionHelper .toException (e , "purgeInstances" );
373- if (translated instanceof RuntimeException ) {
377+ if (translated instanceof TimeoutException ) {
378+ throw (TimeoutException ) translated ;
379+ } else if (translated instanceof RuntimeException ) {
374380 throw (RuntimeException ) translated ;
375381 }
376382 throw new RuntimeException (translated );
0 commit comments