Skip to main content

Error Handling

Common errors, debugging techniques, and troubleshooting guide for the Telnyx React Native SDK.

Authentication Errors

Invalid Credentials

Error: AUTH_FAILED or INVALID_CREDENTIALS Symptoms: Login fails with credential-based authentication. Solutions:

Token Validation Errors

Error: INVALID_TOKEN or TOKEN_EXPIRED Symptoms: JWT token authentication fails. Solutions:

Connection Errors

Error: CONNECTION_FAILED or NETWORK_ERROR Symptoms: Cannot establish WebRTC connection. Solutions:

Call Errors

Call Creation Failures

Error: CALL_FAILED or INVALID_DESTINATION Symptoms: Cannot initiate outgoing calls. Solutions:

Call Control Errors

Error: CALL_NOT_FOUND or INVALID_STATE Symptoms: Call control operations fail. Solutions:

Audio and Media Errors

Audio Permission Errors

Error: MICROPHONE_PERMISSION_DENIED Symptoms: No audio in calls, microphone access denied. Solutions:

Audio Routing Issues

Error: AUDIO_ROUTING_FAILED Symptoms: Audio plays through wrong device (speaker/earpiece). Solutions:

Push Notification Errors

Token Registration Errors

Error: PUSH_TOKEN_INVALID or PUSH_REGISTRATION_FAILED Symptoms: Push notifications not working. Solutions:

Background Processing Errors

Error: BACKGROUND_PROCESSING_FAILED Symptoms: Incoming calls not handled when app is backgrounded. Solutions:

Network and Connectivity Errors

WebRTC Connection Issues

Error: WEBRTC_CONNECTION_FAILED or ICE_CONNECTION_FAILED Symptoms: Calls connect but no audio, or connection drops frequently. Solutions:

Firewall and NAT Issues

Error: NAT_TRAVERSAL_FAILED or FIREWALL_BLOCKED Symptoms: Cannot connect to WebRTC servers, especially on corporate networks. Solutions:

Memory and Performance Errors

Memory Leaks

Error: MEMORY_WARNING or app crashes Symptoms: App becomes slow or crashes after extended use. Solutions:

Performance Issues

Error: Slow UI, delayed call operations Solutions:

Debugging Tools

Enable Debug Logging

Network Request Monitoring

Call State Debugging

Error Recovery Strategies

Automatic Recovery

Graceful Degradation

Best Practices

Error Handling Patterns

  1. Always wrap async operations in try-catch
  2. Provide user-friendly error messages
  3. Log detailed error information for debugging
  4. Implement retry logic for transient failures
  5. Gracefully degrade functionality when possible

Monitoring and Analytics

Testing Error Scenarios

Getting Help

When encountering persistent issues:
  1. Enable debug logging and collect detailed logs
  2. Document reproduction steps clearly
  3. Include device and OS information
  4. Check the error handling guides for your specific issue
  5. Contact Telnyx Support with comprehensive information

See Also