Skip to content

Conversation

@jgraettinger
Copy link
Contributor

@jgraettinger jgraettinger commented Mar 14, 2025

This change is Reviewable

Copy link
Contributor

@psFried psFried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

var statusErr = err.Error()
if len(statusErr) > MAX_ETCD_ERR_LEN {
statusErr = statusErr[:MAX_ETCD_ERR_LEN] + " ...[truncated]"
var err = []rune(err.Error())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to double check: What happens if this error string already contains an invalid utf8 sequence? I'm not 100% certain whether that's even possible, but maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@jgraettinger jgraettinger Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a comment to this effect, as I had had to research it as well to ensure it wouldn't panic.

@jgraettinger jgraettinger merged commit a698a43 into master Mar 31, 2025
1 check passed
@jgraettinger jgraettinger deleted the johnny/utf8-error branch March 31, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants