recording.refused
A recording was refused before anything was sent, because its connection would call a live API or has nothing set for its sandbox, its package is installed, or there is nothing to ask its prompt with.
Area 14, Tools; not declinable; the next step is usually the human's.
Why Jadpo refuses it
jadpo package record calls one operation of a provider once and keeps
the answer as that operation's recording, which tests and jadpo dev
answer from. It calls the provider's sandbox, never its live API, where
a call can cost money or change real data, and never with a stand-in
for a credential, whose answer would be a refusal worth nothing as a
recording. jadpo ai record holds a prompt's model to the same rules.
So the connection has to choose the sandbox, with everything it reads set, before the call is made. Jadpo won't choose the environment or set a credential for you: which account and which of the provider's services the call reaches is yours to decide.
What it looks like
A project whose couriers connection reaches Acme Couriers' live or
sandbox API, as COURIERS_ENVIRONMENT chooses:
app.jadpo:
application { connections: { couriers: { package: AcmeCouriers.v1 domains: [shipping] environment: config.couriers_environment } }}
.env.local chooses the live API, so recording parcels.get is refused:
echo 'COURIERS_ENVIRONMENT=live' > .env.localjadpo package record couriers parcels.get --input '{"parcel_id": "P1"}'
error couriers calls its provider's live API
- reason
jadpo package recordcalls a provider's sandbox, never its live API, andCOURIERS_ENVIRONMENTchooseslive.- next
- Set
COURIERS_ENVIRONMENTtosandboxin.env.local, then run it again (human) - rule
- recording.
refused - help
- https://jadpo.
dev/docs/errors/recording. refused
(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 APIs the call reaches.
With nothing setting COURIERS_ENVIRONMENT, the connection would call a
sandbox it has no setting for:
jadpo package record couriers parcels.get --input '{"parcel_id": "P1"}' error couriers has nothing set for its sandbox
- reason
jadpo package recordcalls the provider's sandbox throughcouriers, which readsCOURIERS_ENVIRONMENT, and nothing sets it.- next
- Set
COURIERS_ENVIRONMENTtosandboxin.env.local, then run it again (human) - rule
- recording.
refused - help
- https://jadpo.
dev/docs/errors/recording. refused
The other refusals, an installed package whose files its digest holds,
or a prompt that no call asks or that jadpo dev hasn't asked yet, say
what to do in their next: line.
How to fix it
If the connection should call the sandbox, choose it in
.env.local, then record the operation again:
echo 'COURIERS_ENVIRONMENT=sandbox' > .env.localjadpo package record couriers parcels.get --input '{"parcel_id": "P1"}'
The call goes to https://sandbox.acme-couriers.example, and an answer
that decodes as a Parcel is kept as
shared/providers/acme_couriers/v1/recordings/parcels.get.json.
Related
Markdown for agents: /docs/errors/recording.refused.md.Built from Jadpo main at aee2e8f.