Troubleshooting

Common issues and how to resolve them.

Authentication Errors

401 Unauthorized: Invalid API key

This error occurs when:

  • The API key is missing or malformed
  • The API key has been revoked
  • You're using a test key in production or vice versa

Solution: Verify your API key in the dashboard and ensure it's correctly set in your environment variables.

403 Forbidden: API key does not have access

This error occurs when your API key doesn't have permission for the requested operation.

Solution: Check your organization settings and ensure the key has the required permissions.

Validation Errors

422 Validation Error: action is required

Every event must have an action field that describes what happened.

Python
1# ❌ Wrong
2client.log(user_id="123")
3
4# ✅ Correct
5client.log(action="user.login", user_id="123")

422 Validation Error: Invalid action format

Actions must follow the format resource.action (e.g., "user.login", "document.created").

Python
1# ❌ Wrong
2client.log(action="UserLoggedIn")
3
4# ✅ Correct
5client.log(action="user.login")

Rate Limiting

429 Too Many Requests

You've exceeded your plan's event limit or hit the rate limit.

Solution: Check your usage in the dashboard. Consider upgrading your plan or implementing client-side batching.

The response includes a Retry-After header indicating when you can retry.

Connection Issues

Timeout errors

If you're experiencing timeouts:

  • Check your network connectivity
  • Verify you're using the correct API endpoint
  • Increase the timeout in your SDK configuration
Python
1# Increase timeout to 30 seconds
2client = logvault.Client(
3 api_key="lv_live_...",
4 timeout=30
5)

SSL/TLS errors

LogVault requires TLS 1.2 or higher. If you're seeing SSL errors, ensure your environment supports modern TLS.

SDK-Specific Issues

Python: Event not appearing in dashboard

The Python SDK is fire-and-forget by default. If an event fails silently, enable error handling:

Python
1try:
2 client.log(action="user.login", user_id="123")
3except logvault.LogVaultError as e:
4 print(f"Failed to log: {e}")

Node.js: Unhandled promise rejection

Always handle errors when using the async SDK:

TypeScript
1// ❌ Wrong - unhandled rejection
2client.log({ action: 'user.login', userId: '123' });
3
4// ✅ Correct - handle errors
5client.log({ action: 'user.login', userId: '123' })
6 .catch(console.error);
7
8// Or use try/catch with await
9try {
10 await client.log({ action: 'user.login', userId: '123' });
11} catch (error) {
12 console.error('Failed to log:', error);
13}

Still Need Help?

If you're still experiencing issues, contact us at support@logvault.eu with:

  • Your organization ID
  • The error message you're seeing
  • A code snippet showing how you're calling the SDK
  • The timestamp when the error occurred