Your chatbot is never affected by SDK errors. The
recordMessages method catches all exceptions internally and will never interrupt your application.Design philosophy
The SDK is designed to be invisible when things go wrong.recordMessages catches all errors internally, including:
- Network failures — the OpenBat API is unreachable or times out
- Invalid responses — the API returns an unexpected response format
- Timeout errors — the request exceeds the allowed duration
- Any unexpected errors — anything else that could go wrong
Console logging
When an error occurs, the SDK logs it to the console for visibility but does not propagate it to your application code. You will see the error in your server logs or terminal output, but notry/catch block is needed around recordMessages.
Monitoring SDK health
To verify your integration is working correctly:- Check the OpenBat dashboard — conversations should appear within minutes of your first
recordMessagescall. - Monitor console logs — look for any SDK error messages in your server output.
- Use API response codes — the capture endpoint returns standard HTTP status codes that indicate what went wrong. See the API reference for the full list.
Common issues
| Symptom | Cause | Fix |
|---|---|---|
| No conversations in dashboard | Invalid or missing API key | Verify OPENBAT_API_KEY matches the key shown in your chatbot’s settings. |
| Conversations appear but no analysis | Analysis pipeline processing | Wait a few minutes — analysis runs asynchronously after ingestion. |
| Console shows 401 errors | API key expired or rotated | Get the current key from Settings → General in the dashboard. |
| Console shows 400 errors | Invalid request body | Check that every message includes both role and content. |
For a full list of status codes and error responses from the capture endpoint, see the API reference.