This guide covers the most common issues you might encounter when integrating with PromptGuard and provides step-by-step solutions.
Authentication Issues
Invalid API Key Error
Problem: Getting 401 Unauthorized errors when making requests. Symptoms:Verify API Key Format
Verify API Key Format
Check that your API key follows the correct format:
Check Environment Variables
Check Environment Variables
Ensure your API key is properly set:
Verify Key Status
Verify Key Status
Check if your API key is active in the dashboard:
- Login to app.promptguard.co
- Navigate to Settings > API Keys
- Verify the key exists and is not revoked
- Check the permissions assigned to the key
Permission Denied Error
Problem: API key lacks required permissions. Symptoms:- Check key permissions in dashboard
- Use a key with appropriate permissions (read/write/admin)
- Contact your team admin to update permissions
Connection Issues
Network Timeout Errors
Problem: Requests timing out or failing to connect. Symptoms:- Connection timeout errors
- Network unreachable errors
- DNS resolution failures
Check Network Connectivity
Check Network Connectivity
Test basic connectivity to PromptGuard:
Adjust Timeout Settings
Adjust Timeout Settings
Increase timeout values in your client:
Check Firewall/Proxy Settings
Check Firewall/Proxy Settings
Ensure your network allows outbound HTTPS connections:
- Whitelist
api.promptguard.coin firewall - Configure proxy settings if required
- Check corporate network restrictions
Security Policy Issues
Unexpected Request Blocks
Problem: Legitimate requests being blocked by security policies. Symptoms:Review Security Events
Review Security Events
- Open app.promptguard.co
- Navigate to Security > Events
- Find the blocked request
- Review the detection reason
- Determine if it’s a false positive
Adjust Security Level
Adjust Security Level
If you’re getting too many false positives:
- Go to Security > Policies
- Switch to a more permissive preset (e.g., from RAG System to Default)
- Test your application
- Gradually increase security as needed
Create Whitelist Rules
Create Whitelist Rules
For legitimate patterns being blocked:
- Navigate to Security > Custom Rules
- Create an “Allow” rule for the specific pattern
- Test to ensure the rule works correctly
High False Positive Rate
Problem: Too many legitimate requests being flagged as threats. Solutions:- Start with Default preset during development
- Gradually increase security in staging
- Monitor false positive rate in dashboard
- Create custom whitelist rules for your use cases
- Contact support for policy tuning assistance
Performance Issues
High Latency
Problem: Requests taking longer than expected. Expected Performance:- PromptGuard overhead: 30-50ms
- Total latency: OpenAI/Anthropic latency + 30-50ms
Measure Latency Components
Measure Latency Components
Optimize Client Configuration
Optimize Client Configuration
Implement Request Caching
Implement Request Caching
Cache responses for identical requests:
Rate Limiting Issues
Too Many Requests Error
Problem: Hitting rate limits. Symptoms:Implement Exponential Backoff
Implement Exponential Backoff
Check Rate Limit Headers
Check Rate Limit Headers
Monitor rate limit status:
Distribute Load
Distribute Load
Use multiple API keys to increase limits:
Model and Provider Issues
Model Not Found Error
Problem: Specified model is not available. Symptoms:Check Supported Models
Check Supported Models
Verify the model name is correct:Supported models:
- OpenAI:
gpt-4,gpt-4-turbo,gpt-3.5-turbo - Anthropic:
claude-3-5-sonnet-latest,claude-3-opus-20240229
Verify Provider Configuration
Verify Provider Configuration
Ensure your provider API keys are configured:
- Go to app.promptguard.co
- Navigate to Settings > Provider Keys
- Add your OpenAI and/or Anthropic API keys
- Test the connection
Provider API Key Issues
Problem: Underlying provider (OpenAI/Anthropic) API key is invalid. Solutions:- Update provider keys in PromptGuard dashboard
- Verify keys are active in provider’s dashboard
- Check key permissions for the models you’re using
- Ensure sufficient credits in provider account
Streaming Issues
Streaming Responses Cut Off
Problem: Streaming responses stop unexpectedly. Solutions:Increase Function Timeouts
Increase Function Timeouts
For serverless deployments:
Handle Stream Errors
Handle Stream Errors
Integration-Specific Issues
Next.js API Routes
Problem: Issues with Next.js API integration. Common Solutions:Environment Variables
Environment Variables
Ensure proper environment variable setup:
CORS Issues
CORS Issues
Configure CORS for frontend requests:
Getting Help
Diagnostic Information
When contacting support, include:Support Channels
Email Support
Technical support for integration issues
System Health
Check API status in real-time
Integration Guides
Complete integration guides and examples
Examples
See working code examples