Skip to content

Commit

Permalink
handle all errors from pod log
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsgstrabo committed Mar 18, 2024
1 parent aeee875 commit d0cb2b1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions api/environments/environment_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,7 @@ func (eh EnvironmentHandler) getServiceAccount() models.Account {
// GetLogs handler for GetLogs
func (eh EnvironmentHandler) GetLogs(ctx context.Context, appName, envName, podName string, sinceTime *time.Time, logLines *int64, previousLog bool) (io.ReadCloser, error) {
podHandler := pods.Init(eh.client)
logger, err := podHandler.HandleGetEnvironmentPodLog(ctx, appName, envName, podName, "", sinceTime, logLines, previousLog)
if errors.IsNotFound(err) {
return nil, err
}

return logger, nil
return podHandler.HandleGetEnvironmentPodLog(ctx, appName, envName, podName, "", sinceTime, logLines, previousLog)
}

// GetScheduledJobLogs handler for GetScheduledJobLogs
Expand Down

0 comments on commit d0cb2b1

Please sign in to comment.