# X_JOB_DECLARATION_INVALID

## Means

the job declaration is missing or mis-declares a field

## Typical cause

job() was called without one or more required fields (input, idempotencyKey, tenant, retry, run) — reachable from generated code and JS callers the type cannot guard — or declares a `concurrency` no worker can honour: a cap of 0, negative, fractional, NaN or Infinity (plain number or `limit`), a `key` that is not a function, a `whenBusy` other than 'wait' or 'fail'. Also raised at ENQUEUE when `concurrency.key(input)` answers an empty string, a non-string or more than 200 characters — an empty key is one lock shared by every run. Every missing field is named in one refusal at declaration

## Fix

`retry: { attempts: 5, backoff: 'exponential' }` on `job('<name>')` — the cause lists every missing field, each with its own edit; for a cap, `concurrency: { key, limit: 1 }` — a whole limit of 1 or more

[Jobs](/error-codes#jobs)
