Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate over-long reason instead of dropping #381

Open
armanbilge opened this issue Sep 23, 2024 · 0 comments
Open

Truncate over-long reason instead of dropping #381

armanbilge opened this issue Sep 23, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@armanbilge
Copy link
Member

// reason must be no longer than 123 bytes of UTF-8 text
// UTF-8 character is max 4 bytes so we can fast-path
if (reason.length <= 30 || reason.getBytes.length <= 123)
Some(reason)
else
None

@armanbilge armanbilge added enhancement New feature or request good first issue Good for newcomers labels Sep 23, 2024
@armanbilge armanbilge changed the title Truncate over-long message instead of dropping Truncate over-long reason instead of dropping Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant