Skip to content

Commit 03937e0

Browse files
Copilotbdehamer
andauthored
Make NoArtifactError.Error() nil-safe
Co-authored-by: bdehamer <398027+bdehamer@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/deployment-tracker/sessions/3eb7150d-f2e1-4ef9-8452-686a5ddb22f0
1 parent 3872598 commit 03937e0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/deploymentrecord/client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ type NoArtifactError struct {
170170
}
171171

172172
func (n *NoArtifactError) Error() string {
173+
if n == nil || n.err == nil {
174+
return "no artifact found"
175+
}
173176
return fmt.Sprintf("no artifact found: %s", n.err.Error())
174177
}
175178

0 commit comments

Comments
 (0)