# `LightningWeb.API.FallbackController`
[🔗](https://github.com/OpenFn/lightning/blob/main/lib/lightning_web/controllers/api/fallback_controller.ex#L1)

Answers an API action's error result with a problem document. A controller
that sets it as `action_fallback` returns refusals from its `with` and never
picks a status itself. `LightningWeb.Plugs.AuthorizeAction` answers its
refusals here too.

Each result has its own clause, and there is deliberately no catch-all. A
result with no clause raises, so it shows up as a 500 and gets a clause.
`{:error, :unauthorized}` from `Permissions.can/4` has no clause either,
because a refused permission is never a 401.

# `call`

```elixir
@spec call(Plug.Conn.t(), term()) :: Plug.Conn.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
