Not a fan of the name of the method.
You can either update findByExecution to return an optional (and impact all usage) or use the findById() in the only place that needs this method. But adding a method in the interface each time you need something slightly different is a code smell. Is it realy needed?
If so, EE should be updated accordingly.
Follow an execution led to 500 errors if the flow is not found
When a flow is not found (I know, this should not happen), the follow from execution will throw a 500 error, it should return a proper response to the use. 
webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java
webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java
diff --git a/webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java b/webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java
index 6b22407e5b..313e3360bb 100644
--- a/webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java
+++ b/webserver/src/main/java/io/kestra/webserver/controllers/ExecutionController.java
@@ -58,6 +58,7 @@
 import io.micronaut.http.annotation.Post;
 import io.micronaut.http.annotation.Put;
 import io.micronaut.http.annotation.QueryValue;
+import io.micronaut.http.exceptions.HttpStatusException;
 import io.micronaut.http.multipart.StreamingFileUpload;
 import io.micronaut.http.server.types.files.StreamedFile;
 import io.micronaut.http.sse.Event;
@@ -1003,7 +1004,7 @@ public MutableHttpResponse<?> resumeByIds(
             );
         }
 
-        for(Execution execution : executions) {
+        for (Execution execution : executions) {
             Execution resumeExecution = this.executionService.resume(execution, State.Type.RUNNING);
             this.executionQueue.emit(resumeExecution);
         }
@@ -1107,7 +1108,14 @@ public Flux<Event<Execution>> follow(
                     () -> executionRepository.findById(tenantService.resolveTenant(), executionId).orElse(null),
                     Duration.ofMillis(500)
                 );
-                Flow flow = flowRepository.findByExecution(execution);
+
+                Flow flow;
+                try {
+                    flow = flowRepository.findByExecution(execution);
+                } catch (IllegalStateException e)  {
+                    emitter.error(new HttpStatusException(HttpStatus.NOT_FOUND, "Unable to find the flow for the execution " + executionId));
+                    return;
+                }
 
                 if (this.isStopFollow(flow, execution)) {
                     emitter.next(Event.of(execution).id("end"));
@@ -1273,7 +1281,8 @@ public MutableHttpResponse<?> setLabelsByIds(
         return HttpResponse.ok(BulkResponse.builder().count(executions.size()).build());
     }
 
-    public record SetLabelsByIdsRequest(List<String> executionsId, List<Label> executionLabels) {}
+    public record SetLabelsByIdsRequest(List<String> executionsId, List<Label> executionLabels) {
+    }
 
     @ExecuteOn(TaskExecutors.IO)
     @Post(uri = "/labels/by-query")
