Skip to content

Commit 5a72606

Browse files
committed
make error message not repeat
1 parent d9c5dfa commit 5a72606

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cli/init.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ func downloadAgentsFile() ([]byte, error) {
158158

159159
resp, err := client.Get(agentsURL)
160160
if err != nil {
161-
return nil, fmt.Errorf("failed to fetch AGENTS.md: %w", err)
161+
return nil, fmt.Errorf("%w", err)
162162
}
163163
defer resp.Body.Close()
164164

165165
if resp.StatusCode != http.StatusOK {
166-
return nil, fmt.Errorf("failed to fetch AGENTS.md: HTTP %d", resp.StatusCode)
166+
return nil, fmt.Errorf("HTTP %d", resp.StatusCode)
167167
}
168168

169169
content, err := io.ReadAll(resp.Body)

0 commit comments

Comments
 (0)