@@ -262,9 +262,9 @@ public CompletableFuture<Void> deleteDecoderManifestAsync(String name) {
262262 if (exception != null ) {
263263 Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
264264 if (cause instanceof ResourceNotFoundException ) {
265- throw new RuntimeException ( "Decoder manifest not found: " + name , cause ) ;
265+ throw ( ResourceNotFoundException ) cause ;
266266 }
267- throw new RuntimeException ("Failed to delete decoder manifest: " + name , cause );
267+ throw new RuntimeException ("Failed to delete the decoder manifest: " + cause );
268268 }
269269 return null ;
270270 });
@@ -289,9 +289,9 @@ public CompletableFuture<Void> deleteVehicleAsync(String vecName) {
289289 if (exception != null ) {
290290 Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
291291 if (cause instanceof ResourceNotFoundException ) {
292- throw new RuntimeException ( "Failed to locate the vehicle: " + vecName , cause ) ;
292+ throw ( ResourceNotFoundException ) cause ;
293293 }
294- throw new RuntimeException ("Failed to delete vehicle: " + vecName , cause );
294+ throw new RuntimeException ("Failed to delete the vehicle: " + cause );
295295 }
296296 return null ;
297297 });
@@ -617,9 +617,9 @@ public CompletableFuture<Void> deleteModelManifestAsync(String name) {
617617 if (exception != null ) {
618618 Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
619619 if (cause instanceof ResourceNotFoundException ) {
620- throw new RuntimeException ( "Failed to locate the model manifest: " + name , cause ) ;
620+ throw ( ResourceNotFoundException ) cause ;
621621 }
622- throw new RuntimeException ("Failed to delete model manifest: " + name , cause );
622+ throw new RuntimeException ("Failed to delete the model manifest: " + cause );
623623 }
624624 logger .info ("{} was successfully deleted" , name );
625625 return null ;
@@ -645,9 +645,9 @@ public CompletableFuture<Void> deleteSignalCatalogAsync(String name) {
645645 if (exception != null ) {
646646 Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
647647 if (cause instanceof ResourceNotFoundException ) {
648- throw new RuntimeException ( "Failed to locate the signal catalog: " + name , cause ) ;
648+ throw ( ResourceNotFoundException ) cause ;
649649 }
650- throw new RuntimeException ("Failed to delete signal catalog: " + name , cause );
650+ throw new RuntimeException ("Failed to delete the signal catalog: " + cause );
651651 }
652652 logger .info ("{} was successfully deleted" , name );
653653 return null ;
@@ -749,9 +749,9 @@ public CompletableFuture<Void> deleteFleetAsync(String fleetId) {
749749 if (exception != null ) {
750750 Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
751751 if (cause instanceof ResourceNotFoundException ) {
752- throw new RuntimeException ( "Failed to locate the fleet: " + fleetId , cause ) ;
752+ throw ( ResourceNotFoundException ) cause ;
753753 }
754- throw new RuntimeException ("Failed to delete fleet: " + fleetId , cause );
754+ throw new RuntimeException ("Failed to delete the fleet: " + cause );
755755 }
756756 logger .info ("{} was successfully deleted" , fleetId );
757757 return null ;
0 commit comments