Skip to main content

Common Issues

Authentication Problems

Problem: Getting authentication errors when making API calls.Solutions:
  1. Check your API key:
  2. Ensure correct format:
  3. Verify API key validity:
    • Check if your API key has expired
    • Ensure you’re using the correct key for your environment
    • Try regenerating your API key in the dashboard
  4. Test with curl:
Problem: Environment variable not being loaded.Solutions:
  1. Check environment variable:
  2. Load environment variables:
  3. Python environment:

Configuration Issues

Problem: Using incorrect base URL causing connection failures.Correct base URL:
Common mistakes:
Problem: Nordlys model not working or model errors.Solutions:
  1. Use default model ID for Nordlys model:
  2. TypeScript type issues:
Problem: Certificate validation errors in some environments.Solutions:
  1. Update certificates:
  2. Node.js certificate issues:
  3. Python certificate issues:

Request/Response Issues

Problem: Getting empty responses or no content.Diagnostic steps:
  1. Check request format:
  2. Verify response handling:
  3. Check for API errors:
Problem: Streaming responses not appearing or failing.Solutions:
  1. Check streaming syntax:
  2. Browser streaming with fetch:
  3. Server-sent events setup:
Problem: Getting 429 errors (rate limit exceeded).Solutions:
  1. Implement exponential backoff:
  2. Check your rate limits:
    • Free tier: 100 requests/minute, 10,000 tokens/minute
    • Pro tier: 1,000 requests/minute, 100,000 tokens/minute
    • Enterprise: Custom limits
  3. Implement request queuing:

Integration-Specific Issues

Problem: LangChain not working with Nordlys.Solutions:
  1. Correct LangChain setup:
  2. Handle LangChain-specific errors:
Problem: Vercel AI SDK not connecting properly.Solutions:
  1. Using the OpenAI-compatible client:
  2. TypeScript issues:
  3. Environment variables in Next.js:

Nordlys Error Scenarios

Model Registry Errors (404)

Symptom:
Common causes:
  • Typo in model name
  • Model not available in your region
  • Model temporarily disabled
Solutions:
  1. Check for typos in your model ID
  2. Use the default model:
  3. Contact support if the model remains unavailable

Upstream Service Errors

Symptom:
Solutions:
  • Retry with exponential backoff
  • Check rate limits in your dashboard
  • Reduce request frequency or batch size

Error Investigation Checklist

When encountering errors:
  1. Capture Context
    • Copy full error response
    • Note the request_id
    • Record timestamp
    • Save request payload (redacted)
  2. Check Error Details
    • Error type and HTTP code
    • Upstream error details (if present)
    • Duration metrics
    • Any retry-after headers
  3. Verify Configuration
    • API key is valid
    • Base URL is correct
    • Model identifier is valid
    • Request payload structure
  4. Review Documentation
  5. Contact Support (if needed)
    • Include request_id
    • Provide error reproduction steps
    • Share redacted request/response

Performance Issues

Problem: Responses taking longer than expected.Diagnostic steps:
  1. Reduce prompt size: Keep prompts concise and trim long chat histories.
  2. Batch smaller requests: Split large documents into smaller chunks.
  3. Check local network latency: Test connectivity to api.nordlyslabs.com.
Problem: Network latency issues.Solutions:
  1. Check your network:
  2. Implement timeout handling:
  3. Use connection pooling:

Development Environment Issues

Problem: Cross-origin resource sharing errors.Solutions:
  1. Never call API directly from browser:
  2. Set up proxy in development:
  3. Configure CORS for your backend:
Problem: TypeScript errors with Nordlys integration.Solutions:
  1. Install correct types:
  2. Type assertion for model parameter:
  3. Create custom types if needed:
Problem: ES modules vs CommonJS issues.Solutions:
  1. Use correct imports:
  2. Package.json configuration:
  3. Node.js version compatibility:

Getting Help

Debug Information to Collect

When reporting issues, please include:
1

Environment Details

2

Request Details

3

Error Information

4

Network Diagnostics

Support Channels

Documentation

Check our comprehensive guides and API reference for solutions

GitHub Issues

Report bugs and request features on our GitHub repository

Discord Community

Get help from the community and Nordlys team members

Email Support

Contact [email protected] for priority assistance

Best Practices for Debugging

1

Start with Simple Requests

Test basic functionality first
2

Enable Verbose Logging

Add detailed logging to understand what’s happening
3

Test with curl

Verify API access outside your application
4

Isolate the Problem

Systematically narrow down the issue:
  • Test different messages
  • Try different parameters
  • Test in different environments
  • Compare with working examples

Complete Error Handling Example

Here’s a production-ready error handling implementation:

FAQ

Use the model ID in your request:
Check the model field in the response: