Skip to content

Commit

Permalink
fix nil pointer on error from RemoteAIResult
Browse files Browse the repository at this point in the history
  • Loading branch information
kyriediculous committed Jul 28, 2024
1 parent 6523765 commit 4258462
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/ot_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,17 @@ func runAIJob(ctx context.Context, aiJob *net.NotifyAIJob, n *core.LivepeerNode,
glog.Error(err)
}

var errString string
if err != nil {
glog.Errorf("AI job failed ID=%v err=%v", aiJob.TaskID, err)
errString = err.Error()
}

aiResult := &core.RemoteAIWorkerResult{
JobType: aiJob.Type,
TaskID: aiJob.TaskID,
Bytes: aiResultBytes,
Err: err.Error(),
Err: errString,
}

// Create a bytes.Buffer and write the JSON data to it
Expand Down

0 comments on commit 4258462

Please sign in to comment.