tracio.aidocs

Getting Started

  • Overview
  • Quick Start
  • How It Works

SDK & API

  • Device Identification JS Agent
  • Trace API Reference
  • Trace Webhooks

Features

  • Device Identification Engine
  • Bot Detection
  • Trace Signals
  • IP Intelligence

Advanced

  • Cloud Deployment
  • Privacy & GDPR
  • Migration from FPJS

Reference

  • Changelog
  • Troubleshooting
  • Error Handling
  • Testing

Error Handling

Handle Device Identification errors, timeouts, rate limits, and edge cases. Includes error codes, retry strategies, and fallback patterns.

Error Handling

Handle errors gracefully in production to prevent silent failures.

try {
const result = await tc.get();
console.log(result.visitorId);
} catch (error) {
if (error.message === 'timeout') {
// Collection took too long — retry or use fallback
console.warn('Signal collection timed out');
} else if (error.message === 'network') {
// Network error — API unreachable
console.error('API connection failed');
} else {
// Unknown error
console.error('Identification failed:', error);
}
}

Common error types:

ErrorCauseSolution
timeoutSignal collection exceeded timeoutIncrease timeout or reduce signal set
networkAPI endpoint unreachableCheck endpoint URL, proxy config
authInvalid API keyVerify key in dashboard
rate_limitToo many requestsImplement backoff, check plan limits