Skip to content

Commit da4dadd

Browse files
authored
chore: return error if trying to access analysis run logs and not configured (#3748)
Signed-off-by: Kent Rancourt <[email protected]>
1 parent acadcce commit da4dadd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: internal/server/get_analysisrun_logs_v1alpha1.go

+7
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ func (s *server) GetAnalysisRunLogs(
3636
)
3737
}
3838

39+
if s.cfg.AnalysisRunLogURLTemplate == "" {
40+
return connect.NewError(
41+
connect.CodeUnimplemented,
42+
errors.New("AnalysisRun log streaming is not configured"),
43+
)
44+
}
45+
3946
namespace := req.Msg.GetNamespace()
4047
if err := validateFieldNotEmpty("namespace", namespace); err != nil {
4148
return err

0 commit comments

Comments
 (0)