Skip to content

test: cover a pending stored request with a null handledAt - #1079

Merged
vdusek merged 1 commit into
v3from
fix/request-queue-request-types
Sep 25, 2026
Merged

vdusek merged 1 commit into
v3from
fix/request-queue-request-types

Conversation

@vdusek

@vdusek vdusek commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Both points of #266 were fixed on v3 by #1016. The stored request type now has handledAt?: Date | null, and id, uniqueKey and url are required.

The other fields (method, retryCount, userData, headers, loadedUrl) stay optional. The API validates a new request but doesn't fill in defaults, so a request added with only url and uniqueKey comes back without them.

This PR adds a test for that case: getRequest() gets a pending request with only the required fields and handledAt: null, parses it, and types handledAt as nullable. The get-request mock route now uses responseJsonMock so the test can override the response.

Closes #266

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 25, 2026
@vdusek vdusek self-assigned this Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ There are broken links in the documentation.

See more at https://github.com/apify/apify-client-js/actions/runs/36111005853#summary-107994213544

@vdusek
vdusek merged commit 9edafa5 into v3 Sep 25, 2026
8 checks passed
@vdusek
vdusek deleted the fix/request-queue-request-types branch September 25, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants