
A redaction SDK that fails in a way you can handle. An SDK is a convenience wrapper around a contract. It hides the HTTP details, but it cannot hide a bad policy, a timeout or a partial result. The integration is only as good as its error handling and its version pin.
Part of redaction API and SDKs. For the adjacent case, read redaction cli and redaction webhook.
What changes in this environment
A client with a base URL, a credential provider and a policy object. Submit returns a job handle; the client polls or exposes an event; the download returns the output and the report. Pin the SDK version and read the changelog before an upgrade.
Where the data hides
The visible page is only one layer. In this environment, check:
- Local temp files used for downloads
- Debug logs that include extracted text
- Exception messages with a file path
- Retry queues that keep a copy
- The credential in a config file
The redaction flow
- Initialize the client with a scoped credential.
- Load the policy and validate it before the first file.
- Submit and handle the job handle, not just the promise.
- Download the output and the report.
- Close the client and clean the temp directory.
Controls to verify
- Typed exceptions and a retry policy with jitter.
- Idempotency keys on submit.
- A timeout that is shorter than the caller's timeout.
- No document text in debug logs.
- A pinned version and a tested upgrade path.
Retention and evidence
The SDK may cache a download or a report on disk. Those copies need the same deletion rule as the service. A retry queue can retain a document after the job is done; check it.
Limits
Language and platform coverage vary. Streaming large files and cancellation are often the weak points. The SDK cannot decide the policy or replace the reviewer.
What a good SDK saves you from
The SDK's job is encoding the failure modes the API can return so your code handles them deliberately. Distinguish retryable errors (network, throttling) from permanent ones (corrupt file, unsupported format); a client that retries a permanent error forever is an outage generator. Check that the SDK exposes the full removal report, not just bytes — evidence dropped at the client is evidence lost. And read how the SDK streams large files; buffering a gigabyte in memory is a mistake that surfaces at the worst moment.
Versioning and pinning
SDK versions drift from API versions at the worst times. Pin the SDK version in the dependency manifest, subscribe to the changelog, and run the hard-file suite against a new SDK before promoting it. The SDK should identify itself in requests — the user-agent is how support finds your traffic. When the vendor deprecates a major version, the migration guide is the document to demand, not just the deadline; a guide names the behavior changes, and behavior changes are what break integrations.
One decision to document
The single most valuable line in an SDK integration is the policy version recorded per call. When the vendor ships a new model, your outputs shift subtly — a category found last month now missed — and without the version you cannot say when or why. Store it next to the report you already keep. The second decision: whether the SDK sends the file at all, or a reference to storage you both trust; large payloads through the SDK are where memory limits and timeouts live.
How Veilbrook fits
Veilbrook can be called from an SDK with a policy and a report. Ask for the current language support and the error schema, then test cancellation and retry.
Before you release
Open the output in the same tool the recipient will use. Select each masked area and paste it into a text editor. Search for every value you removed, including the header, the attachment, the comment and the OCR layer. Compare the report with the file and keep both. If a value survives, the job is not done.
Common mistakes
- Covering text instead of replacing it.
- Checking the body but not the header or the attachment.
- Treating a successful job as a reviewed file.
- Calling a masked document anonymous.
- Leaving the original in a shared folder.
What to ask before you build
- Which languages and runtimes are supported?
- How are errors typed?
- Is there a streaming or chunked upload?
- How is the SDK versioned?
- Where does it write temp files?