call.production_refused
A query or action was run with jadpo call against a database that isn't on this machine, which may be production.
Area 14, Tools; not declinable; the next step is usually the human's.
Why Jadpo refuses it
jadpo call runs a query or action as a caller you name, and an action may write. It is for trying things on your machine, so it reaches only a database on this machine, through a Unix socket, localhost, 127.0.0.1 or ::1, and refuses any other before it runs anything, since one elsewhere may hold real people's data. --rollback doesn't change this, and no flag skips it.
Jadpo won't decide that a database elsewhere is safe to run against. Only you know whether it is a server you can throw away.
What it looks like
A project whose action add_note writes a note:
use notes/entities { Note }use notes/types { NoteBody }/// Writes a note down.action add_note(body: NoteBody) -> Note { return Note.create { set: { body: body } }}
--url names a database on another server, as it might after copying a production address:
jadpo call add_note --input '{"body":"Buy milk"}' --url postgresql://app@db.example.com/notes error The database main at db.example.com isn't on this machine
- reason
jadpo callruns a query or action on your machine only, so it reaches only a database on this machine: a Unix socket,localhost,127.0.0.1or::1. One anywhere else may be production. Nothing was run.- next
- Give the connection's setting a database on this machine with
jadpo config set, or startjadpo dev, which starts one (human) - rule
- call.
production_ refused - help
- https://jadpo.
dev/docs/errors/call. production_ 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 database the call reaches.
The address is shown by its host, never with a password, and an address the connection's setting gives is refused the same way.
How to fix it
If the call is for the database jadpo dev starts, leave out --url and run it while jadpo dev is running in another terminal:
jadpo call add_note --input '{"body":"Buy milk"}'The call finds the database jadpo dev started and writes the note there.
If you keep a development database of your own, name it:
jadpo call add_note --input '{"body":"Buy milk"}' --url postgresql://localhost/notes_devThe call runs against that database, which is on this machine, and writes the note there.
Related
Markdown for agents: /docs/errors/call.production_refused.md.Built from Jadpo's main branch at commit ee389ee.