Commit 53dc481
authored
feat: surface approval URL when calling unapproved Actor (#1111)
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
<img width="912" height="113" alt="image"
src="https://github.com/user-attachments/assets/c9d4376f-a0dd-4746-8842-7f72eabcb2ae"
/>
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
- [x] Manually triggered against `apify/puppeteer-scraper`, approval URL
surfaces correctly
- [ ] Add a vitest case for the `full-permission-actor-not-approved`
branch1 parent f606fe5 commit 53dc481
2 files changed
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
91 | 102 | | |
92 | 103 | | |
93 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments