Skip to content

Commit

Permalink
fix error condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmcorvidae committed Sep 30, 2024
1 parent d40317a commit 7147b3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ func sendNotif(ctx context.Context, j *Job, status, subject, msg string, email b
p.RunDuration = durString
p.EndDuration = remainingString
access_url, err := j.accessURL()
if err != nil && access_url != "" {
if err != nil {
return errors.Wrapf(err, "failed to determine access URL for job")
}
if access_url != "" {
p.AccessURL = access_url
}
if email {
Expand Down

0 comments on commit 7147b3c

Please sign in to comment.