| title | Errors |
|---|---|
| description | Handle stable error codes, machine-readable reasons, request paths, and provider failures. |
| icon | triangle-exclamation |
Transformation and restoration failures are atomic: datafog core returns no partially transformed result.
| Field | Meaning |
|---|---|
code |
Stable top-level error category |
reason |
Optional machine-readable detail |
message |
Sanitized human-readable explanation |
path |
Optional RFC 6901 request path |
finding_index / findingIndex |
Optional index of an invalid or conflicting supplied finding |
input_index / inputIndex |
Optional batch member index; finding indexes are local to that member |
markerIssues |
Browser workspace preflight issues with kind and byte/codepoint/UTF-16 ranges |
Error messages and metadata do not include matched PII, key material, credentials, token payloads, or restored plaintext.
invalid_configurationinvalid_findingreview_conflict
review_conflict means overlap selection would leave part of another eligible
finding untransformed. Resolve/correct the claims and obtain fresh review before
retrying. No partial result or provider call occurs. Exact duplicates, complete
containing coverage and explicit entity selection/allowlists retain their
documented behavior; all supplied findings validate before filtering.
key_provider_requiredkey_not_foundkey_access_deniedkey_provider_unavailableinvalid_key_materialkey_provider_error
token_provider_requiredinvalid_tokenunsupported_token_versiontoken_not_foundtoken_expiredtoken_access_deniedinvalid_token_materialtoken_provider_unavailabletoken_provider_error
unsupported_strategyinternal_error
invalid_batchclosed_workspaceinactive_planworkspace_conflictinvalid_markerinvalid_snapshotinvalid_operation_id,invalid_operation,operation_reusedinvalid_policyinvalid_conversation,conversation_unknown,conversation_pending,invalid_send_intentinactive_stream,invalid_encodingresource_limit
Workspace.restoreReport returns marker issues with text: null; the strict
Workspace.restore wrapper throws invalid_marker for those issues. Validation
and resource errors can still throw from either call. Source preparation rejects
invalid markers before approval and may carry markerIssues on the error.
model_load_failedmodel_inference_failedmodel_resource_exhaustedmodel_session_busymodel_session_closedmodel_cleanup_failed
Some model pre-validation and initialization failures are native JavaScript exceptions. Catch those at the host boundary too; do not treat failures as an empty successful scan or an implicit rule-only fallback.
See the browser SDK declarations for the complete DataFogErrorCode union.
try {
scanAndTransform(text, config);
} catch (error) {
if (error instanceof DataFogError) {
console.error(error.code, error.path);
}
}from datafog_core import DataFogConfigurationError
try:
scan_and_transform(text, config)
except DataFogConfigurationError as error:
print(error.code, error.reason, error.path)