Documentation
¶
Overview ¶
Package errtext prepares error text for persisted error fields, which the Admin API shows to operators unchanged.
Index ¶
Constants ¶
const MaxBytes = 64 * 1024
MaxBytes bounds persisted error text. A provider may reply with a body of several megabytes, and error fields are rewritten on every attempt.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
Configure registers the chain RPC URL and other configured secret values. Call it once at startup, before any error text is persisted; until then only URL credentials, queries, and fragments are removed.
func Redact ¶
Redact returns text safe to persist in an error field: configured secrets become a placeholder, URLs lose credentials, query, and fragment, and the result fits MaxBytes.
func RedactError ¶
RedactError preserves error identity while making its message safe for output.
Types ¶
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor removes configured secrets from diagnostic text.
func (*Redactor) RedactError ¶
RedactError preserves error identity with a request-scoped safe message.