pub fn bounded_error(category: &str, detail: &str) -> StringExpand description
Bound an error message to DIAGNOSTICS_ERROR_MAX_CHARS chars, preserving
a leading category if one is supplied.
category is a short stable label (e.g. "timeout"); detail is the
free-form error text that may be truncated. No credentials are added — the
caller passes only a bounded diagnostic string.