Commit 88d28b0
fix: treat empty APIFY_ACTOR_PRICING_INFO env var as no pricing info
The platform sets APIFY_ACTOR_PRICING_INFO to `{}` for Actors without a
configured pricing model. The previous normalizer injected default
fields but left the `pricingModel` discriminator missing, causing the
apify-client pydantic union to fail with `union_tag_not_found` and every
Actor run to crash on startup with a ValidationError.
Treat an empty JSON object (and already-parsed non-dict values) as
"no pricing info" so the union resolves to `None`, matching the pre-v3
behavior where `data or None` handled the same case.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a8656c6 commit 88d28b0
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| 87 | + | |
85 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
365 | 376 | | |
366 | 377 | | |
367 | 378 | | |
| |||
0 commit comments