# E4188

Compiler diagnostic name: `async_with_error_poly`.

`async` functions cannot use error polymorphism.

MoonBit currently does not support combining `async` with `raise?`. An `async`
function is raising by default, so use an ordinary `async fn` when the function
may raise, or remove `async` if the function is not asynchronous.

## Erroneous example

The following function combines `async` with `raise?`:

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

MoonBit will report an error.

## Suggestion

Remove `raise?` from the async function, or remove `async` if the function does
not need asynchronous behavior:

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