# Catching GenServer.call/3 timeout exits

`GenServer.call/3` does not return `{:error, :timeout}` when the server misses its deadline. It exits the caller instead.

```elixir
def fetch(server) do
  try do
    {:ok, GenServer.call(server, :fetch, 100)}
  catch
    :exit, {:timeout, {GenServer, :call, _}} ->
      {:error, :timeout}
  end
end
```

A bare `:timeout` catch never matches because the exit reason includes the call details.

Catch that full shape only when a timeout is an expected result in your client API. If the server replies after the caller continues, that late reply can still arrive in the caller's mailbox.

https://hexdocs.pm/elixir/GenServer.html#call/3


---

Created by: almirsarajcic
Date: September 19, 2026
URL: https://elixirdrops.net/d/zFC2h9WN
