Troubleshooting

Solutions for common issues and error resolution

Common Issues

API Connection Issues

Error: API key invalid

Solutions:

  • Verify API key is correctly copied
  • Check if API key is expired
  • Ensure API key has proper permissions

Error: Rate limit exceeded

Solutions:

  • Wait for rate limit to reset
  • Upgrade to a higher tier
  • Implement request caching

Integration Issues

// Common integration error handling
try {
	const response = await zonia.chat.send({
		message: "Your query"
	});
} catch (error) {
	if (error.code === 'AUTHENTICATION_ERROR') {
		// Handle auth issues
		console.error('API key invalid or expired');
	} else if (error.code === 'RATE_LIMIT_ERROR') {
		// Handle rate limiting
		console.error('Rate limit exceeded');
	} else if (error.code === 'NETWORK_ERROR') {
		// Handle connection issues
		console.error('Network connection failed');
	}
}

Performance Optimization

Response Time Issues

  • • Implement request caching
  • • Use streaming responses
  • • Optimize payload size
  • • Enable compression

Memory Usage

  • • Limit context window size
  • • Clear unused resources
  • • Implement pagination
  • • Monitor memory usage

Debugging Tools

Logging

zonia.setLogLevel('debug');
zonia.enableLogging({
	requests: true,
	responses: true
});

Monitoring

zonia.monitor({
	metrics: ['latency', 'errors'],
	interval: '1m'
});

Testing

await zonia.test({
	endpoint: '/chat',
	scenarios: ['basic', 'edge']
});

Support Resources

Community Support

  • • Community forums
  • • GitHub discussions
  • • Stack Overflow tags

Premium Support

  • • Direct email support
  • • Priority response
  • • Technical consulting