Troubleshooting
Common errors and solutions. Error: json { "error": { "code": "UNAUTHORIZED", "message": "Missing or invalid API key" } } Causes: - Missing...
Last updated: January 14, 2026
Troubleshooting
Common errors and solutions.
Authentication Errors
401 Unauthorized
Error:
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid API key"
}
}
Causes:
- Missing
Authorizationheader - Invalid API key
- Malformed Bearer token
Solutions:
- Ensure header format is
Authorization: Bearer YOUR_API_KEY - Verify API key is correct (check for extra spaces)
- Generate a new API key if compromised
# Correct format
curl -H "Authorization: Bearer bso_live_xyz789abc..." ...
# Common mistakes
curl -H "Authorization: bso_live_xyz789abc..." ... # Missing "Bearer"
curl -H "Authorization:Bearer bso_live_xyz789abc..." ... # Missing space
403 Forbidden
Error:
{
"error": {
"code": "PERMISSION_DENIED",
"message": "Insufficient permissions for this operation"
}
}
Causes:
- API key lacks required permission scope
- Accessing another user's resource
- Enterprise feature on lower tier
Solutions:
- Check required scope for the endpoint
- Update API key permissions in dashboard
- Create new key with correct permissions
# Check your key's permissions
curl -X GET "https://api.blocksecops.com/api/v1/api-keys" \
-H "Authorization: Bearer YOUR_API_KEY"
Key Expired
Error:
{
"error": {
"code": "KEY_EXPIRED",
"message": "API key has expired"
}
}
Solution:
- Create a new API key
- Update applications with new key
- Consider longer expiration next time
Pagination Errors
Invalid Cursor
Error:
{
"error": {
"code": "INVALID_CURSOR",
"message": "The provided cursor is invalid or malformed"
}
}
Causes:
- Cursor string was modified or truncated
- Using cursor from different endpoint
- Copy/paste error
- Cursor doesn't decode to valid JSON
Solutions:
- Use cursor exactly as returned by API
- Don't modify or encode cursor values
- Start from first page if cursor is lost
- Cursors are base64url encoded - don't add padding
Cursor Expired
Error:
{
"error": {
"code": "CURSOR_EXPIRED",
"message": "Cursor has expired due to data changes"
}
}
Causes:
- Significant data changes since cursor was created
- Very old cursor
Solution:
Start pagination from the beginning without a cursor.
Invalid Pagination Parameters
Error:
{
"error": {
"code": "INVALID_REQUEST",
"message": "Cannot use first/after with last/before"
}
}
Causes:
- Using both forward and backward pagination params
firstandlastspecified together
Solutions:
- Use only
first/afterfor forward pagination - Use only
last/beforefor backward pagination - Don't mix forward and backward params
Rate Limiting
429 Too Many Requests
Error:
{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded"
}
}
Solutions:
Check headers for reset time:
X-RateLimit-Reset: 1704931200 Retry-After: 300Implement exponential backoff:
import time wait_time = 2 ** attempt # 1, 2, 4, 8, 16 seconds time.sleep(wait_time)Reduce request frequency:
- Batch operations
- Cache responses
- Use webhooks for events
Upgrade plan for higher limits
Scan Errors
Scan Failed
Error:
{
"error": {
"code": "SCAN_FAILED",
"message": "Scan failed during execution"
}
}
Causes:
- Invalid contract syntax
- Unsupported Solidity version
- Contract too large
Solutions:
- Verify contract compiles locally
- Check supported Solidity versions
- Split large contracts into smaller files
Quota Exceeded
Error:
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Monthly scan quota exceeded"
}
}
Solutions:
- Wait for quota reset (first of month)
- Upgrade to higher plan
- Check quota usage:
GET /users/me/quota
Upload Errors
File Too Large
Error:
{
"error": {
"code": "FILE_TOO_LARGE",
"message": "File exceeds maximum size limit"
}
}
Limits:
- Single file: 10 MB
- Zip archive: 50 MB
Solutions:
- Remove unnecessary files
- Split into multiple uploads
- Contact support for enterprise limits
Invalid File Type
Error:
{
"error": {
"code": "INVALID_FILE_TYPE",
"message": "File type not supported"
}
}
Supported types:
.sol- Solidity.vy- Vyper.rs- Rust (Solana).move- Move.cairo- Cairo.zip- Archive containing above
Resource Errors
404 Not Found
Error:
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "The requested resource was not found"
}
}
Causes:
- Invalid resource ID
- Resource was deleted
- Accessing another user's resource
Solutions:
- Verify resource ID is correct
- Check if resource still exists
- Ensure you have access to the resource
409 Conflict
Error:
{
"error": {
"code": "CONFLICT",
"message": "Resource state conflict"
}
}
Causes:
- Duplicate resource
- Concurrent modification
- Invalid state transition
Solutions:
- Check if resource already exists
- Retry with fresh data
- Use optimistic locking if available
Getting Help
If you can't resolve an issue:
- Check status page: status.blocksecops.com
- Search documentation: docs.blocksecops.com
- Community Discord: discord.gg/blocksecops
- Email support: [email protected]
Include in support requests:
- Request ID (from response headers)
- Endpoint and method
- Error message
- Timestamp