# `recording.failed`

A recording by `jadpo package record` or `jadpo ai record` got no answer worth keeping from the sandbox or the model, or its call couldn't be made.

Area 14, [Tools](/docs/tooling.md); not declinable; the next step is usually the agent's.

## Why Jadpo refuses it

`jadpo package record` calls one operation of a provider's sandbox once
and keeps the answer as that operation's recording, which tests and
`jadpo dev` answer from; `jadpo ai record` does the same for a prompt's
model. A recording is only worth keeping if it is an answer the
operation's types read. When the call can't be made, gets no answer, or
gets one that doesn't decode, nothing is recorded, so no test ever
answers from it.

## What it looks like

A project whose `couriers` connection reaches Acme Couriers' live or
sandbox API, as `COURIERS_ENVIRONMENT` chooses, with the sandbox on
this machine at port 1:







app.jadpo:

```jadpo
application {
    connections: {
        couriers: {
            package: AcmeCouriers.v1
            domains: [shipping]
            environment: config.couriers_environment
        }
    }
}
```


Nothing is listening there, so the call gets no answer:

```sh
echo 'COURIERS_ENVIRONMENT=sandbox' > .env.local
jadpo package record couriers parcels.get --input '{"parcel_id": "P1"}'
```

```text
error: The sandbox didn't answer `couriers.parcels.get`
  reason: It couldn't be reached, or it said it did nothing and asked to be called later.
  next: Check the sandbox is up, then run it again (human)
  rule: recording.failed
  help: https://jadpo.dev/docs/errors/recording.failed
```

`(human)` at the end of the `next:` line tells your coding agent to stop
and ask you which fix you want, because the choice is yours to make: it
decides which of Acme's services the call reaches.

An answer the operation's types don't read is refused the same way,
with the field that didn't decode and the type to correct, which your
agent can do. `jadpo ai record` says the same of a model that gave no
answer, or a fixture that failed before anything was asked.

## How to fix it

The question is whether the sandbox's address is right.

**If it is**, start the sandbox, then record the operation again:

```sh
jadpo package record couriers parcels.get --input '{"parcel_id": "P1"}'
```

An answer that decodes as a `Parcel` is kept as
`shared/providers/acme_couriers/v1/recordings/parcels.get.json`.

**If it isn't**, correct the `sandbox:` host in the package's
`provider.jadpo` to the provider's sandbox:

```jadpo
provider {
    ...
    hosts: {
        live: "https://api.acme-couriers.example"
        sandbox: "https://sandbox.acme-couriers.example"
    }
}
```









The next recording calls `https://sandbox.acme-couriers.example`.

## Related

- [`jadpo package record`](/docs/commands-for-packages.md#jadpo-package-record)
- [Provenance and confirmation](/docs/where-packages-come-from.md#provenance-and-confirmation)
- [`jadpo ai show` and `jadpo ai record`](/docs/commands-for-looking-into-and-changing-code.md#jadpo-ai-show-and-jadpo-ai-record)
