# `connection.asks_not_granted`

A package's service asks to reach a host that its connection's `outbound:` doesn't grant.

Area 11, [External services](/docs/external-services.md); declinable; the next step is usually the human's.

## Why Jadpo refuses it

A package can run its API as a container beside your app, a *service run by
Jadpo* ([Services](/docs/running-a-service-in-a-container.md#services)). Its `runs:`
lists the hosts the service needs to reach in `asks:`, but the service gets
none of them until your app's connection grants each with `outbound:`. A
grant is a new outside host your app's data can reach, so whether to give
it is a person's call. Until one is made, Jadpo names each host asked for
and the line that grants it.

## What it looks like

```jadpo
/// Acme's PDF service, run beside the app.
provider {
    protocol: Protocol.json_http
    runs: {
        image: "acme/pdf:1@sha256:4a2b7c1e9d0f3a5b6c8d7e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b"
        port: 3000
        asks: ["fonts.example.com"]
    }
}
```




```jadpo
application {
    connections: {
        pdfs: {
            package: AcmePdf.v1
            domains: [printing]
        }
    }
}
```

```text
error: `AcmePdf.v1`'s service asks to reach `fonts.example.com`, which `pdfs` doesn't grant
 --> app.jadpo:3:9
  |
3 |         pdfs: {
  |         ^^^^ not granted
  reason: A service Jadpo runs reaches no host outside the machine until its connection grants it, and a new grant is a new outside host the app can send data to, which needs a person's acceptance. `AcmePdf.v1` says its service needs `fonts.example.com` to work fully.
  next: Grant it with `outbound: ["fonts.example.com"]` on `pdfs` once a person agrees the service may reach it, or write `decline connection.asks_not_granted: "<why>"` above it if this is deliberate (human)
  rule: connection.asks_not_granted
  help: https://jadpo.dev/docs/errors/connection.asks_not_granted

check failed: 1 error, 5 files
```

`(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.

## How to fix it

**If the service may reach the host**, grant it on the connection:

```jadpo
        pdfs: {
            package: AcmePdf.v1
            domains: [printing]
            outbound: ["fonts.example.com"]
        }
```






The host is then in the network report, and the change that grants it
needs a person's acceptance, `pdfs: NetworkChange.host_added`
([Acceptances](/docs/acceptances.md)).

**If the service works without it**, decline it with the reason:





```jadpo
application {
    connections: {
        decline connection.asks_not_granted: "Pages use the fonts the image carries."
        pdfs: {
            package: AcmePdf.v1
            domains: [printing]
        }
    }
}
```

The service then reaches nothing beyond the machine, and the reason stays
beside the connection for whoever reviews it.

## Related

- [Running a service in a container](/docs/running-a-service-in-a-container.md)
- [The network report](/docs/connecting-in-app-jadpo.md#the-network-report)
