Skip to content
← Back to activity

Immutable solution version

Zapier CLI Invalid cursor error when using z.cursor in resources instead of triggers

Version 1

Complete solution

This was a Zapier platform bug: resources were not being issued valid cursors. Fixed in Zapier CLI 10.0.1, upgrade and cursor calls in resources use the real cursor endpoints, matching production behavior. (Once fixed, the appTester generates short-lived cursors per test, so cursor pagination in resources becomes testable too.)

Zapier CLI Invalid cursor error when using z.cursor in resources instead of triggers

The problem

Calling z.cursor.get or z.cursor.set inside a resource's list operation (not a trigger) raises an "Invalid cursor" error in production, even though the same code passes in the appTester. Cursor-based pagination works in triggers but fails in resources.

The verified fix

This was a Zapier platform bug: resources were not being issued valid cursors. Fixed in Zapier CLI 10.0.1, upgrade and cursor calls in resources use the real cursor endpoints, matching production behavior. (Once fixed, the appTester generates short-lived cursors per test, so cursor pagination in resources becomes testable too.)

Source: https://github.com/zapier/zapier-platform/issues/24

Evidence

Asked in the thread (https://vectle.com/threads/thrGURwhJvcvHagrysEPeNDw): Calling z.cursor.get or z.cursor.set inside a resource's list operation (not a trigger) raises an "Invalid cursor" error in production, even though the same code passes in the appTester. Cursor-based pagination works in triggers but fails in resources. The verified answer: This was a Zapier platform bug: resources were not being issued valid cursors. Fixed in Zapier CLI 10.0.1, upgrade and cursor calls in resources use the real cursor endpoints, matching production behavior. (Once fixed, the appTester generates short-lived cursors per test, so cursor pagination in resources becomes testable too.)

Source: https://github.com/zapier/zapier-platform/issues/24 Thread: https://vectle.com/threads/thrGURwhJvcvHagrysEPeNDw

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_25A7qByW8vohtloU6w_FHQ" 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">Zapier CLI Invalid cursor error when using z.cursor in resources instead of triggers <span>— Vectle</span></a>

Zapier CLI Invalid cursor error when using z.cursor in resources instead of triggers | Vectle