Skip to main content

Errors and Debugging

This page describes how errors are surfaced in RowOps, the error classes used, retry behavior, and logging visibility for debugging.


Error Classes

Pipeline Errors

Error ClassStageBehavior
MaskingFailedErrorMaskFail-closed; pipeline halts
TransformFailedErrorTransformFail-closed; pipeline halts
Parse errorParsePipeline halts; no rows returned
Validation errorValidateRow marked invalid; pipeline continues

Initialization Errors

ErrorCause
Invalid key formatKey does not match expected prefix (pk_ or sk_)
License verification failedNetwork error, invalid credentials, or revoked key
Engine initialization failedConfiguration error
Domain not allowedPublishable key used from unregistered domain

API Errors

StatusMeaning
400Missing required parameter (e.g., API key)
402Plan limits exceeded or domain limits exceeded
403Invalid key, domain not allowed, or not authorized
404Project or organization not found

Error Surfaces

Client-Side Errors

Errors in pipeline execution are thrown as typed exceptions:

try {
await pipeline.run(data);
} catch (error) {
if (error instanceof MaskingFailedError) {
// Handle masking failure
} else if (error instanceof TransformFailedError) {
// Handle transform failure
}
}

Validation Errors

Validation errors are not thrown. They are returned in the result:

const result = await validate(rows, schema);

// Check for invalid rows
if (result.invalid.length > 0) {
for (const error of result.invalid) {
console.log(`Row ${error.rowIndex}: ${error.field} - ${error.message}`);
}
}

API Errors

API endpoints return JSON error responses:

{
"error": "domain_not_allowed",
"message": "Domain is not registered for this project"
}

Retry Behavior

License Verification

License verification retries on transient failures:

PropertyValue
Max retries3
BackoffExponential (100ms, 200ms, 400ms)
Failure behaviorFail-closed if all retries fail

Webhook Delivery

Webhook delivery retries on server errors:

PropertyValue
Max retries5
BackoffExponential (1s, 2s, 4s, 8s, 16s, capped at 60s)
Jitter20% for thundering herd prevention
No retry on4xx client errors

Pipeline Operations

Pipeline operations do not automatically retry:

  • Parse failures are immediate and fatal
  • Mask/Transform failures halt without retry
  • Validation completes fully (no partial retry)

Logging Visibility

Console Output Prefixes

Client-side logging uses consistent prefixes:

PrefixCategory
[RowOps]General client initialization and status
[License]Tier and domain verification issues
[Auth]Authentication events
[audit]Audit system status

Audit Logs

Audit logs are persisted server-side:

PropertyBehavior
StorageServer-side database
Failure handlingFail-safe; errors logged but don't crash application
Missing orgIdWarning logged; no persistence

What Is Logged

EventLogged Content
Import startImport ID, schema ID, row count
Import completeFinal status, error count
Key usageKey ID, domain, timestamp
Configuration changesActor, action, entity references

What Is Not Logged

ContentReason
Row valuesPrivacy; row data not persisted
Cell contentPrivacy; validation errors reference fields, not values
File contentPrivacy; parsed data stays client-side

Debugging Strategies

Initialization Failures

  1. Check console for [RowOps] prefixed messages
  2. Verify API key format (pk_ for browser, sk_ for headless)
  3. Check network tab for license verification requests
  4. Verify domain is registered (publishable keys)

Pipeline Failures

  1. Check for thrown MaskingFailedError or TransformFailedError
  2. Inspect error message for configuration issues
  3. Validate schema configuration before pipeline run
  4. Test with smaller dataset to isolate issue

Validation Issues

  1. Check result.invalid array for specific errors
  2. Review error codes and row indices
  3. Compare failing values against schema rules
  4. Export invalid rows for offline analysis

Engine Initialization Issues

  1. Check console for initialization messages
  2. Check browser console for load errors
  3. Verify configuration is correct

Error Recovery

What the System Recovers From

ScenarioRecovery
Transient network failure (license)Automatic retry with backoff
Transient webhook failureAutomatic retry with backoff
Invalid rows in datasetContinue processing; collect errors

What the System Does Not Recover From

ScenarioBehavior
Parse failureFatal; no partial results
Masking failureFatal; no fallback to unmasked
Transform failureFatal; no fallback to untransformed
Engine initialization failurePipeline cannot start
All license retries exhaustedFail-closed