acoustic-carpenter-78188
06/02/2026, 11:51 PMTaskEnvironment that isn't declared in their config, _build_images raised a bare ValueError. During flyte deploy / flyte run this is captured and leaks into Sentry as if it were an SDK crash (FLYTE-SDK-4C), even though it's a user-config mistake.
This swaps the bare ValueError for the purpose-built InvalidImageNameError (a RuntimeUserError subclass that already exists in flyte/errors.py). It is already filtered by flyte/_sentry.py:_is_user_error, so it stops polluting Sentry, and it gives the user a clearly-typed, actionable error.
ValueError: Image name 'usda-firecon' not found in config. Available: ['solution_image']
The message is preserved verbatim; only the exception type changes.
Closes
• FLYTE-SDK-4C — ValueError: Image name '...' not found in config from flyte._deploy in _build_images.
fixes FLYTE-SDK-4C
Test plan
• tests/cli/test_run.py::test_build_images_image_name_not_found_error updated to assert InvalidImageNameError (message assertions unchanged) — passes.
• make fmt clean.
🤖 Generated with Claude Code
flyteorg/flyte-sdkacoustic-carpenter-78188
06/03/2026, 2:22 PM