ErrLookupBackground articles › "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys

"X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys

"vertex_project and vertex_location are required", "must be set", "cannot be empty", "No application program defined" - these are missing-required-config errors: a library refuses to proceed because a mandatory setting was absent at the point it was needed. Developers meet this family when wiring SDKs, proxies, and frameworks (litellm, EasyWeChat, Hadoop, Yii2, k6 and others), typically in fresh CI runners or containers where env vars and config keys that existed on the dev machine never arrive. This article explains the mechanism shared by all of them, the recurring causes, and fixes that work across the family.

Distilled from 81 documented records across 18 repositories.

Background

This family sits at the configuration-validation layer of a library, between object construction and the first real operation. Libraries enforce it as a fail-fast guard: instead of sending empty credentials, building a malformed URL, or silently doing nothing, they raise a ValueError, IllegalArgumentException, RuntimeException, or framework exception naming the missing key. The check can run eagerly at construction (EasyWeChat Config::checkMissingKeys, Yii2 Theme::applyTo, ruflo ConformanceRunner) or lazily at first use (Yii2 FileDependency at cache evaluation, ruflo proofSigningKey on the first session:create event, EasyWeChat Server::getToken on the first callback), which is why some variants surprise you well after startup.

From the caller's side the error looks uniform: the message names one or more required keys, and the fix is to supply them via one of the library's resolution paths. Records show a consistent resolution ladder - per-call params, environment variables, module-level or process-level defaults, config files, and secret stores. litellm's Vertex AI handlers are the canonical example: project and location resolve from call params, VERTEXAI_PROJECT/VERTEXAI_LOCATION env vars, module attributes, or secrets, and the ValueError fires only when every rung comes up empty. EasyWeChat, Watsonx, Purview, and Hadoop's ABFS follow the same shape with different key names.

The family varies most in what counts as "missing" and what else interacts with the check. EasyWeChat checks key existence, not non-empty values, while many others use falsy checks where an empty string still triggers the error. Some checks can be bypassed by an alternative: litellm's api_base short-circuits project/location resolution on some handler paths - but not on the Imagen image-edit path, where project/location are needed to build the URL regardless; Watsonx's "deployment/<id>" model prefix skips the project check entirely. A distinct subgroup (litellm's CodeInterpreterInterception and Ovalix guards, Hadoop's MiniKdc) fires only when invariants are broken after construction - config mutated mid-session - which signals a library bug or misuse rather than a plain omission.

Common causes

What usually fixes it

Go deeper

Documented occurrences

…and 61 more across the corpus — use search.

Honest provenance: generated on 2026-08-25 from AI-assisted analysis of the linked records. See how records are made.