# `call.unavailable`

The database `jadpo call` runs against couldn't be reached or has migrations not yet applied, so nothing was run.

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

## Why Jadpo refuses it

A call reads and writes the database as the app does, so it needs one that answers and holds every migration the project has. `jadpo call` changes nothing it wasn't asked to, so it never applies a migration itself, as `jadpo seed` and `jadpo dev` do: it stops and says which.

## What it looks like

A project whose action `add_note` writes a note:




```jadpo
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 this machine whose server isn't running:

```sh
jadpo call add_note --input '{"body":"Buy milk"}' --url postgresql://localhost:5499/notes
```

```text
error: The database `main` can't be reached
  reason: Connecting to it failed, so nothing was run.
  next: Check the database is running, then run `jadpo call` again (human)
  rule: call.unavailable
  help: https://jadpo.dev/docs/errors/call.unavailable
```

`(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, and whether its migrations are applied.

## How to fix it

**If the server isn't running**, start it, or run the call while `jadpo dev` is running and leave out `--url`:

```sh
jadpo call add_note --input '{"body":"Buy milk"}'
```

The call finds the database `jadpo dev` started, which has every migration applied, and writes the note there.

**If migrations are waiting**, apply them, then call again:

```sh
jadpo migrate apply --url postgresql://localhost/notes_dev
```

The database then holds every migration, and the same call runs against it.

## Related

- [Writes, on your machine only](/docs/running-a-query-or-action-jadpo-call.md#writes-on-your-machine-only)
- [`jadpo call`](/docs/commands-for-the-database-settings-and-translations.md#jadpo-call)
- [`jadpo migrate`](/docs/commands-for-the-database-settings-and-translations.md#jadpo-migrate)
