Skip to main content

redact_error_body

Function redact_error_body 

Source
pub fn redact_error_body(body: &str) -> String
Expand description

Trim and length-cap a raw provider error body before stuffing it into CloudAiError::Status. Idempotent and safe on UTF-8: truncates at the last char boundary <= MAX_ERROR_BODY_LEN.