You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Capped Git provider error message can end in half a character #853
providerDetail in services/api/internal/transport/http/handler/git_handler.go caps a provider's validation message with msg[:300], which cuts by bytes. When byte 300 lands inside a multi-byte character the API error ends in half a rune, which shows up as � once the response is JSON-encoded. gitsvc.ProviderMessage already caps its message by runes.
Area
API
Steps to reproduce
Have a Git provider answer a request with a validation or unsupported error whose message is longer than 300 bytes and has a multi-byte character across byte 300 (e.g. a localized message, or one quoting a branch or file name with é, CJK text or an emoji).
Look at the message of the 400 error the API returns ("the platform rejected the request: ...").
Expected behavior
The message is cut at the last whole character before the cap, then ….
Actual behavior
The last character before … is broken and comes out as �.
Activity
pullfrog commentedon Dec 3, 2026