# `Cucumber.PendingStepError`
[🔗](https://github.com/huddlz-hq/cucumber/blob/main/lib/cucumber/pending_step_error.ex#L1)

Exception raised when a step (or before hook) signals it is not yet
implemented by returning `:pending` or `{:pending, message}`.

Pending follows the Cucumber semantics: the remaining steps in the
scenario are skipped, after hooks still run, and the scenario as a whole
fails with this error — pending work is a failure, unlike `:skipped`
which is deliberate and non-failing.

This is a distinct exception type (rather than a `Cucumber.StepError`) so
downstream features can treat it specially — e.g. retry logic must never
retry a pending step, and Cucumber Messages report it as PENDING rather
than FAILED.

# `t`

```elixir
@type t() :: %Cucumber.PendingStepError{
  __exception__: term(),
  feature_file: String.t() | nil,
  message: String.t(),
  reason: String.t() | nil,
  scenario_name: String.t() | nil,
  step: Gherkin.Step.t() | nil
}
```

# `new`

```elixir
@spec new(
  {:step, Gherkin.Step.t()} | :before_hook,
  String.t() | nil,
  String.t(),
  String.t()
) :: t()
```

Builds the error for a pending signal.

`source` is `{:step, step}` for a pending step definition, or
`:before_hook` when a before hook returned the pending signal. `reason`
is the optional message from `{:pending, message}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
