Troubleshooting
Common issues, error messages, and resolution procedures
Authentication Issues
Invalid Credentials Error
Message: 401 Unauthorized — Invalid credentials
Cause: Email or password is incorrect, or account is locked.
Resolution:
- Verify email address is correct (case-sensitive)
- Check for Caps Lock
- If locked, wait 15 minutes or contact administrator
- Use demo credentials:
analyst@rayray.demo/Analyst123!
Token Expired
Message: 401 Unauthorized — Token has expired
Cause: JWT access token expired (default: 30 minutes).
Resolution:
- Frontend automatically refreshes tokens via refresh token
- If refresh fails, log out and log back in
- Check system clock synchronization (NTP)
MFA Verification Failed
Message: 401 Unauthorized — Invalid MFA code
Cause: TOTP code is incorrect or expired.
Resolution:
- Ensure authenticator app time is synchronized
- Enter code quickly (30-second window)
- Do not reuse codes
- If persistent, reset MFA via Settings → Security
Document Upload Issues
File Too Large
Message: 413 Payload Too Large
Cause: File exceeds maximum size (50MB).
Resolution:
- Split large PDFs into smaller documents
- Compress images within documents
- For Excel, remove unused sheets/rows
- Contact admin for increased limit
Unsupported File Type
Message: 400 Bad Request — Unsupported file type
Cause: File extension not in allowed list.
Resolution:
- Convert to supported format: PDF, XLSX, XLS, CSV
- Ensure file extension matches content
- Do not rename file extensions manually
Corrupted File
Message: 422 Unprocessable Entity — Unable to extract content
Cause: File structure is damaged or malformed.
Resolution:
- Re-export from source application
- Try "Save As" to create fresh copy
- Repair tools: Adobe Acrobat (PDF), Excel "Open and Repair"
Extraction Issues
Extraction Timeout
Message: 504 Gateway Timeout — Extraction timed out
Cause: Document too complex or LLM API slow.
Resolution:
- Retry extraction (may be transient)
- Split document into smaller sections
- Check Claude API status: status.anthropic.com
- Contact support if persistent
Low Confidence Extractions
Message: Warning: 5 extractions below confidence threshold
Cause: AI uncertain about extracted values.
Resolution:
- Review low-confidence extractions carefully
- Click extraction to see source location
- Correct values if necessary
- If source is ambiguous, request clarification
Missing Attributes
Message: Warning: 3 attributes not found
Cause: Document does not contain expected attributes.
Resolution:
- Verify document is appropriate for scoring profile
- Check if attribute uses different naming/units
- Manually enter values if known from other sources
- Mark as "Not Available" if genuinely absent
Comparison Issues
Insufficient Documents
Message: 400 Bad Request — Minimum 2 documents required
Cause: Comparison requires at least 2 documents.
Resolution: Upload and extract at least 2 documents before creating comparison.
Profile Weight Error
Message: 400 Bad Request — Weights must sum to 1.0
Cause: Scoring profile weights are misconfigured.
Resolution:
- Edit scoring profile
- Adjust weights to sum to exactly 1.0
- Example: 0.25 + 0.25 + 0.30 + 0.20 = 1.00
Export Issues
PPTX Generation Failed
Message: 500 Internal Server Error — PPTX generation failed
Cause: python-pptx library not installed or corrupted.
Resolution:
# Check installation
pip show python-pptx
# Reinstall if missing
pip install python-pptxPDF Generation Failed
Message: 500 Internal Server Error — PDF generation failed
Cause: reportlab library not installed or corrupted.
Resolution:
# Check installation
pip show reportlab
# Reinstall if missing
pip install reportlabAudit System Issues
Hash Chain Verification Failed
Message: Verification failed at event evt_xyz123
Cause: Audit log integrity compromised (rare, serious).
Resolution:
- This indicates potential tampering — escalate immediately
- Preserve all logs for investigation
- Contact ISSO/ISSM
- Document timeline of events
Audit Query Timeout
Message: 504 Gateway Timeout — Query timed out
Cause: Querying too many events without proper filters.
Resolution:
- Add date range filters
- Filter by event type
- Use pagination (limit/offset)
- Contact admin for large data exports
Permission Errors
Insufficient Role
Message: 403 Forbidden — Insufficient permissions
Cause: User role does not have required permission.
Resolution:
| Action | Minimum Role |
|---|---|
| View documents | Observer |
| Upload documents | Analyst |
| Approve extractions | Reviewer |
| Manage users | Admin |
| Verify audit integrity | Admin |
Performance Issues
Slow Document Loading
Symptoms: Document viewer takes >10 seconds to load.
Possible Causes:
- Large file size (>20MB)
- Network latency
- Server under load
Resolution:
- Check network connection
- Try during off-peak hours
- Split large documents
- Contact admin if persistent
Extraction Queue Backlog
Symptoms: Extractions pending for >5 minutes.
Cause: High system load or LLM API rate limits.
Resolution:
- Wait for queue to process
- Avoid submitting multiple extractions simultaneously
- Contact admin if backlog persists >30 minutes
Diagnostic Commands
Check API Health
curl -s http://localhost:8000/health | jqCheck Database Connection
# From apps/api directory
python -c "from app.database import engine; print(engine.url)"Verify Claude API Key
curl -s https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-3-5-sonnet-20241022","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}'Check Audit Log Integrity
curl -s http://localhost:8000/api/audit/verify \
-H "Authorization: Bearer $TOKEN" | jqError Code Reference
| Code | Meaning | Action |
|---|---|---|
| 400 | Bad Request | Check request format/parameters |
| 401 | Unauthorized | Re-authenticate |
| 403 | Forbidden | Check user role/permissions |
| 404 | Not Found | Check resource ID/URL |
| 409 | Conflict | Resource state conflict |
| 413 | Payload Too Large | Reduce file size |
| 422 | Unprocessable Entity | Check file format/content |
| 429 | Too Many Requests | Wait and retry |
| 500 | Internal Server Error | Contact support with request ID |
| 502 | Bad Gateway | Check upstream service |
| 503 | Service Unavailable | Wait and retry |
| 504 | Gateway Timeout | Reduce request complexity |
Support Escalation
| Issue Type | First Contact | Escalation |
|---|---|---|
| General usage | Team Lead | System Admin |
| Authentication | System Admin | Security Team |
| Data extraction | Team Lead | Developer |
| Security incident | ISSO | ISSM |
| Audit integrity | ISSO | ISSM → CISO |
Related
- API Reference — Error codes and responses
- Audit System — Log verification
- Authentication — Auth troubleshooting