pkg/gitea/rest.go caps error response bodies at ~8 KB before formatting them into the error message. When Gitea returns a helpful multi-KB error (e.g. validation errors on bulk operations), the useful part may be silently cut. Callers get a half-message with no signal that more was available.
Suggested direction
When truncation happens, append a clear marker like ... [truncated, original NNN bytes]
Log a Warn with the full byte count
Consider raising the cap to ~32 KB specifically for error bodies (responses are usually well under that)
## Problem
`pkg/gitea/rest.go` caps error response bodies at ~8 KB before formatting them into the error message. When Gitea returns a helpful multi-KB error (e.g. validation errors on bulk operations), the useful part may be silently cut. Callers get a half-message with no signal that more was available.
## Suggested direction
- When truncation happens, append a clear marker like `... [truncated, original NNN bytes]`
- Log a `Warn` with the full byte count
- Consider raising the cap to ~32 KB specifically for error bodies (responses are usually well under that)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
pkg/gitea/rest.gocaps error response bodies at ~8 KB before formatting them into the error message. When Gitea returns a helpful multi-KB error (e.g. validation errors on bulk operations), the useful part may be silently cut. Callers get a half-message with no signal that more was available.Suggested direction
... [truncated, original NNN bytes]Warnwith the full byte count