#[non_exhaustive]pub enum SecretScanErrorCode {
Show 26 variants
InvalidInput,
InvalidOptions,
InvalidDetector,
DetectorFailure,
InvalidCandidate,
PolicyFailure,
InvalidPolicyAction,
InvalidFindings,
PlaceholderFailure,
InvalidPlaceholder,
InvalidLimits,
InputLimitExceeded,
BufferLimitExceeded,
TokenLimitExceeded,
MultilineLimitExceeded,
FindingLimitExceeded,
InvalidState,
InvalidRuleset,
PiiSelectorInvalid,
PiiSelectorUnsupported,
PiiSelectorUnavailable,
PiiActivationConflict,
InvalidActionPolicy,
InvalidDetectionConfig,
DetectionConfigConflict,
EmptyDetectionSet,
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidInput
The host passed something other than a text input. The core itself
only accepts &str, so this code is produced by bindings.
InvalidOptions
Scan options could not be interpreted. Produced by bindings that accept dynamically typed option objects.
InvalidDetector
A detector registration was rejected: malformed or duplicate id.
DetectorFailure
A detector reported a failure while scanning.
InvalidCandidate
A detector returned a candidate that violates the candidate contract.
PolicyFailure
The policy reported a failure while evaluating a finding.
InvalidPolicyAction
A policy returned something that is not one of the four actions.
The Rust Action enum cannot express this, so this
code is produced by bindings that accept dynamically typed actions.
InvalidFindings
A redaction finding is out of range, misordered, or overlaps another finding.
PlaceholderFailure
The placeholder formatter reported a failure while redacting.
InvalidPlaceholder
The placeholder formatter returned an empty, oversized, or matched-value-reproducing placeholder.
InvalidLimits
An incremental session’s or whole-input operation’s limits were missing, non-positive, or did not satisfy the documented relationship between them.
InputLimitExceeded
An accepted input would exceed the configured input-byte limit: an
incremental session’s total accepted input across every append, or a
whole-input scan/redact/scan_and_redact call’s input.
BufferLimitExceeded
An incremental session’s retained, unresolved plaintext would exceed
max_buffered_bytes.
TokenLimitExceeded
An incremental session’s open single-line construct would exceed
max_token_bytes without closing.
MultilineLimitExceeded
An incremental session’s open PEM-style private-key block would
exceed max_multiline_bytes without closing.
FindingLimitExceeded
The accepted finding count from a whole-input scan would exceed the
configured finding-count limit. Only whole-input scan and
scan_and_redact (and redact given an externally-constructed
finding list) produce this code; there is no incremental equivalent.
InvalidState
An incremental session received append, finalize, or abort
after it left the accepting state.
InvalidRuleset
A caller-supplied declarative ruleset was rejected while loading
(decision-define-declarative-detector-ruleset-contract). The fixed
rejection class is carried separately by
RulesetError::class, never by this
code alone.
PiiSelectorInvalid
A PII selector does not match the accepted lowercase grammar.
PiiSelectorUnsupported
A valid PII selector names no supported jurisdiction or family.
A known PII jurisdiction or family is absent from this artifact.
PiiActivationConflict
PII initialization conflicts with the already active selection.
InvalidActionPolicy
A caller-supplied declarative action policy was rejected while loading
(decision-define-the-versioned-declarative-action-policy-and-default-overlay).
The fixed rejection class and the rule index are carried separately by
ActionPolicyError, never by this code
alone.
InvalidDetectionConfig
A detector-id selection was rejected while a registry or an owner was
configured (decision-define-detector-id-selection-and-configuration-replacement-precedence).
The fixed rejection class is carried separately by
DetectionConfigError::class_name,
never by this code alone.
DetectionConfigConflict
A detector-selection initialization differs from the configuration the owner is already fixed to. A conflict changes nothing.
EmptyDetectionSet
The configuration leaves nothing enabled: no built-in detector, no ruleset and no PII family. Binding it to a scan owner is refused; a preview still describes it.