# E0014

Warning name: `alert` or `alert_<category>`

Alert warnings are emitted when code uses an API that carries an alert, for
example through `#alert`, [`#internal`](../attributes.md#internal-attribute), or
a visibility-change annotation. The alert category is chosen by the API
provider, so the warning name can be `alert` for all alerts or
`alert_<category>` for one category.

## Erroneous example

The provider module marks `experimental` as internal, and the importing module
calls it:

```{literalinclude} /sources/error_codes/0014_error/provider/top.mbt
:language: moonbit
:caption: provider/top.mbt
```

```{literalinclude} /sources/error_codes/0014_error/top.mbt
:language: moonbit
:caption: top.mbt
```

## Suggestion

Read the alert category and message, then follow the guidance for that specific
API. Different alert categories can mean different things: an API may be
experimental, deprecated, visibility-changing, unsafe, not total, or carry a
provider-defined meaning.

In this example, the provider asks callers to use the stable API instead:

```{literalinclude} /sources/error_codes/0014_fixed/provider/top.mbt
:language: moonbit
:caption: provider/top.mbt
```

```{literalinclude} /sources/error_codes/0014_fixed/top.mbt
:language: moonbit
:caption: top.mbt
```
