Skip to main content

Error Handling

Streaming API

Resuming an interrupted stream

A stream collector can be interrupted for several reason: given maximum of hits (max_hits) reached, end_behaviour configured accordingly, no credits left, server issues or connection problems. To resume a disconnected stream, set the parameter resume_offset to the resume_offset of the last CT_CONTROL chunk. This allows to continue streaming from the exact position of that resume_offset on.

{
"chunk_type": "CT_CONTROL",
"chunk_control": {
"connection_id": "<some_connection_id>",
"resume_offset": "<resume_offset>",
"collector_id": "<some_collector_id>"
}
}
curl -XGET 'https://api.talkwalker.com/api/v3/stream/c/<collector_id>/results?access_token=<access_token>&resume_offset=<resume_offset>'

Document API

Document import fails with "Does not match any xyz" Error

Documents that do not match a projects queries can not be imported into a project. The details of the the error message explain what part of the project was not matched. The provided document must match the settings of the project (languages, countries, source types and blocked sources) and the query of at least one topic.

When importing documents from a specific domain, an extra topic similar to domainurl:"http://my-site.com/" can help to match all uploaded documents.