# `flag.store_invalid`

Flags' settings in `app.jadpo` hold something other than a database's `store:`.

Area 16, [Built-in services](../topics/built-in-services.md); not declinable; the next step is usually the agent's.

## Why Jadpo refuses it

`flags: { store: }` names the database every flag's state is kept in,
and holds nothing else: the flags themselves are declared in
`flags.jadpo`. A name that isn't one of the app's databases would leave
the flags with nowhere to keep what they are switched to.

## What it looks like

```jadpo
application {
    connections: {
        main: {
            driver: Driver.postgres
            url: config.database_url
        }
    }
    flags: {
        store: mian
    }
}
```

```text
error: `store: mian` isn't a database
 --> app.jadpo:9:16
  |
9 |         store: mian
  |                ^^^^ not a database
  reason: Every flag's state is kept in a database, so a change reaches each server; this application's databases are `main`.
  next: Use `main` instead of `mian` (agent)
  rule: flag.store_invalid
  help: https://jadpo.dev/docs/errors/flag.store_invalid

check failed: 1 error, 3 files
```



`(agent)` at the end of the `next:` line means your coding agent can make
the fix itself.

## How to fix it

**If it names a database by a misspelling**, use its name:

```jadpo
    flags: {
        store: main
    }
```




Each flag's state is now kept in `main`. With one database, `flags:` can
also be left out: the only database keeps it.

## Related

- [Changing a flag](../topics/feature-flags.md#changing-a-flag)
- [Stores](../topics/stores.md)
