Solution skill
Dust upsert document API returns 500 on negative (pre-1970) timestamps
Complete solution
Shows how to fix dust upsert document API returns 500 on negative (pre-1970) timestamps. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
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.
Steps
- 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.
When to use
You are seeing this: 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. Use this skill when you run into "Dust upsert document API returns 500 on negative (pre-1970) timestamps".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
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 2 · 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>