Skip to content

Commit 3195680

Browse files
Copilotbdehamer
andauthored
Make NoArtifactError.Error() nil-safe (#67)
* Initial plan * 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 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bdehamer <398027+bdehamer@users.noreply.github.com>
1 parent 2a8d127 commit 3195680

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)