---
title: 'ARCE0001: A module declares a schema and handle/2 but does not use Arc.Command'
editUrl: https://github.com/Cratis/Arc.Elixir/edit/main/Documentation/code-analysis/ARCE0001.md
description: ARCE0001 warns when an Elixir module declares an Arc.Schema and handle/2 but does not use Arc.Command, so Arc never discovers or routes the command.
lastUpdated: 2026-11-14T00:00:00.000Z
---


**Kind:** module. **Default severity:** warning. The .NET counterpart is `ARC0002`.

## Rule

Arc discovers commands by their `use Arc.Command`. A module with an `Arc.Schema` and a `handle/2` function looks like a command, so when it does not `use Arc.Command`, the author almost certainly forgot to. Nothing fails; the command is just never routed, never validated and never in the generated proxies.

## Why it matters

The mistake is silent. The module compiles, its own tests may even pass when they call `handle/2` directly, and the failure appears as a 404 from the client.

## Bad

```elixir
defmodule MyApp.Authors.Registration.RegisterAuthor do
  use Arc.Schema

  schema do
    field :id, :uuid, key: true, required: true
    field :name, :string, required: true
  end

  def handle(%__MODULE__{} = command, _ctx),
    do: {:append, %MyApp.Authors.AuthorRegistered{name: command.name}}
end
```

## Good

`use Arc.Command` includes `use Arc.Schema`, so replace it:

```elixir
defmodule MyApp.Authors.Registration.RegisterAuthor do
  use Arc.Command

  schema do
    field :id, :uuid, key: true, required: true
    field :name, :string, required: true
  end

  def handle(%__MODULE__{} = command, _ctx),
    do: {:append, %MyApp.Authors.AuthorRegistered{name: command.name}}
end
```

## How to fix

- If the module is a command, replace `use Arc.Schema` with `use Arc.Command`.
- If it is not a command, rename `handle/2`, for example to `process/2`.
- If the shape is deliberate, switch the rule off for the module with `@arc_analyzer ignore: ["ARCE0001"]`.

## Related rules

- [ARCE0004: A command appends to Chronicle itself](/arc/backend/elixir/code-analysis/arce0004/)
