@@ -262,9 +262,9 @@ public CompletableFuture<Void> deleteDecoderManifestAsync(String name) {
262
262
if (exception != null ) {
263
263
Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
264
264
if (cause instanceof ResourceNotFoundException ) {
265
- throw new RuntimeException ( "Decoder manifest not found: " + name , cause ) ;
265
+ throw ( ResourceNotFoundException ) cause ;
266
266
}
267
- throw new RuntimeException ("Failed to delete decoder manifest: " + name , cause );
267
+ throw new RuntimeException ("Failed to delete the decoder manifest: " + cause );
268
268
}
269
269
return null ;
270
270
});
@@ -289,9 +289,9 @@ public CompletableFuture<Void> deleteVehicleAsync(String vecName) {
289
289
if (exception != null ) {
290
290
Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
291
291
if (cause instanceof ResourceNotFoundException ) {
292
- throw new RuntimeException ( "Failed to locate the vehicle: " + vecName , cause ) ;
292
+ throw ( ResourceNotFoundException ) cause ;
293
293
}
294
- throw new RuntimeException ("Failed to delete vehicle: " + vecName , cause );
294
+ throw new RuntimeException ("Failed to delete the vehicle: " + cause );
295
295
}
296
296
return null ;
297
297
});
@@ -617,9 +617,9 @@ public CompletableFuture<Void> deleteModelManifestAsync(String name) {
617
617
if (exception != null ) {
618
618
Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
619
619
if (cause instanceof ResourceNotFoundException ) {
620
- throw new RuntimeException ( "Failed to locate the model manifest: " + name , cause ) ;
620
+ throw ( ResourceNotFoundException ) cause ;
621
621
}
622
- throw new RuntimeException ("Failed to delete model manifest: " + name , cause );
622
+ throw new RuntimeException ("Failed to delete the model manifest: " + cause );
623
623
}
624
624
logger .info ("{} was successfully deleted" , name );
625
625
return null ;
@@ -645,9 +645,9 @@ public CompletableFuture<Void> deleteSignalCatalogAsync(String name) {
645
645
if (exception != null ) {
646
646
Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
647
647
if (cause instanceof ResourceNotFoundException ) {
648
- throw new RuntimeException ( "Failed to locate the signal catalog: " + name , cause ) ;
648
+ throw ( ResourceNotFoundException ) cause ;
649
649
}
650
- throw new RuntimeException ("Failed to delete signal catalog: " + name , cause );
650
+ throw new RuntimeException ("Failed to delete the signal catalog: " + cause );
651
651
}
652
652
logger .info ("{} was successfully deleted" , name );
653
653
return null ;
@@ -749,9 +749,9 @@ public CompletableFuture<Void> deleteFleetAsync(String fleetId) {
749
749
if (exception != null ) {
750
750
Throwable cause = exception .getCause () != null ? exception .getCause () : exception ;
751
751
if (cause instanceof ResourceNotFoundException ) {
752
- throw new RuntimeException ( "Failed to locate the fleet: " + fleetId , cause ) ;
752
+ throw ( ResourceNotFoundException ) cause ;
753
753
}
754
- throw new RuntimeException ("Failed to delete fleet: " + fleetId , cause );
754
+ throw new RuntimeException ("Failed to delete the fleet: " + cause );
755
755
}
756
756
logger .info ("{} was successfully deleted" , fleetId );
757
757
return null ;
0 commit comments