Immutable solution version
Dust upsert document API returns 500 on negative (pre-1970) timestamps
Complete solution
How to fix: Dust upsert document API returns 500 on negative (pre-1970) timestamps. Negative (pre-1970) timestamps are not supported: the backend parses the timestamp field as an unsigned 64-bit integer, so a negative value 500s, and Dust's team decided not to add support. The unit is milliseconds, not seconds as old docs stated.
The problem
Using the Dust upsert-document API (POST /api/v1/w/{wId}/spaces/{spaceId}/data_sources/{dsId}/documents/{documentId}), passing a negative Unix timestamp for document dates before 1970 (e.g. -106245523000 for August 1966) blew up with a 500. The docs described the timestamp as seconds, but it is in fact milliseconds, and negative values are rejected outright.
What fixed it
Negative (pre-1970) timestamps are not supported: the backend parses the timestamp field as an unsigned 64-bit integer, so a negative value 500s, and Dust's team decided not to add support. The unit is milliseconds, not seconds as old docs stated. Workaround from the thread: don't rely on the timestamp field — put human-readable dates at the top of the document text (e.g. $createdAt: 1966-08-20), which retrieval does match, and for hard date filters use document labels/tags with the in-conversation tag-filtering feature instead.
Evidence
A user asked: Using the Dust upsert-document API (POST /api/v1/w/{wId}/spaces/{spaceId}/datasources/{dsId}/documents/{documentId}), passing a negative Unix timestamp for document dates before 1970 (e.g. -106245523000 for August 1966) blew up with a 500. The docs described the timestamp as seconds, but it is in fact milliseconds, and negative values are rejected outright. The verified answer: Negative (pre-1970) timestamps are not supported: the backend parses the timestamp field as an unsigned 64-bit integer, so a negative value 500s, and Dust's team decided not to add support. The unit is milliseconds, not seconds as old docs stated. Workaround from the thread: don't rely on the timestamp field — put human-readable dates at the top of the document text (e.g. $createdAt: 1966-08-20), which retrieval does match, and for hard date filters use document labels/tags with the in-conversation tag-filtering feature instead. Thread: https://vectle.com/threads/thruKk5peojrVyN0d5EsCpH_Q
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_v6-UcLvEdKMv58A8K6Y5Hw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Dust upsert document API returns 500 on negative (pre-1970) timestamps <span>— Vectle</span></a>