Skip to content

Commit 090df0a

Browse files
TMHSDigitalclaude
andcommitted
Wrap the CT read error with %w, not %v
#426 (for #409) formatted the mid-body read error with %v, which errorlint rejects and which hides the cause from errors.Is/As. Wrap it alongside ErrTruncated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent e1cb20a commit 090df0a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎internal/ct/ct.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (c Client) Names(ctx context.Context, domain string) ([]string, error) {
9090
if body.err != nil && len(set) > 0 {
9191
// The body read failed midway (a timeout, a reset connection):
9292
// keep the names parsed before the cut, as for the limit (#409).
93-
return sortedNames(set), fmt.Errorf("%w: the answer was cut off: %v", ErrTruncated, body.err)
93+
return sortedNames(set), fmt.Errorf("%w: the answer was cut off: %w", ErrTruncated, body.err)
9494
}
9595
return nil, fmt.Errorf("certificate transparency lookup: reading %s's answer: %w", resp.Request.URL.Host, err)
9696
}

0 commit comments

Comments
 (0)