fix(exceptions): catch specific error instead of broad

This commit is contained in:
2026-07-01 21:36:50 +01:00
parent a330471bec
commit 913c5c8790
3 changed files with 3 additions and 32 deletions

View File

@@ -6,7 +6,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@@ -76,13 +75,9 @@ public class StreamActionsService {
progressTracker.markComplete();
return CompletableFuture.completedFuture(outputFile);
} catch (IOException e) {
} catch (Exception e) {
logger.error("Failed to save section to '{}'", outputFile, e);
return CompletableFuture.failedFuture(e);
} catch (InterruptedException e) {
logger.error("Failed to save section");
Thread.currentThread().interrupt();
return CompletableFuture.failedFuture(e);
}
}
}