Skip to content

feat: surface approval URL when calling unapproved Actor#1111

Merged
raethlo merged 5 commits into
masterfrom
feat/approval-required-error
May 14, 2026
Merged

feat: surface approval URL when calling unapproved Actor#1111
raethlo merged 5 commits into
masterfrom
feat/approval-required-error

Conversation

@raethlo
Copy link
Copy Markdown
Contributor

@raethlo raethlo commented Apr 30, 2026

tldr; the run Actor API returns an approvalUrl when an Actor needs full account access — we were swallowing it and only printing the bare error message.

Before

Run: Calling Actor apify/puppeteer-scraper (YJCnS9qogi9XxDgLB)

Error: This Actor requires full access to your account. You must approve its permissions before running it.

After

image

Handled in the same catch block as record-not-found in run-on-cloud.ts. Affects apify call, apify actors call, apify actors start, apify task run and apify tasks run.

Test plan

  • Manually triggered against apify/puppeteer-scraper, approval URL surfaces correctly
  • Add a vitest case for the full-permission-actor-not-approved branch

@raethlo raethlo marked this pull request as ready for review May 4, 2026 08:15
@raethlo raethlo requested a review from vladfrangu as a code owner May 4, 2026 08:15
@raethlo
Copy link
Copy Markdown
Contributor Author

raethlo commented May 4, 2026

@vladfrangu I am not sure about the tests, Claude generated and heavily mocked 🤷🏻 there don't seem to be any other lib tests, so I think we could just remove them

@patrikbraborec patrikbraborec requested a review from l2ysho May 7, 2026 09:51
Copy link
Copy Markdown
Contributor

@l2ysho l2ysho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx @raethlo this seems fine. I would keep the tests, there is no nice way how to test this anyway. Better some guard than no guard.

@raethlo raethlo enabled auto-merge (squash) May 14, 2026 10:16
@raethlo raethlo merged commit 53dc481 into master May 14, 2026
22 of 23 checks passed
@raethlo raethlo deleted the feat/approval-required-error branch May 14, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants