# `route.output_mismatch`

Route output is not exactly what it runs returns.

Area 7, [HTTP](../topics/http.md); not declinable; the next step is usually the agent's.

`output:` is exactly what the route runs returns:

```jadpo
type Memo = Text {
    max_length: 200
}

type MemoId = Uuid {}

type AddMemo = Input {
    text: Memo
}

type MemoView = Output {
    text: Memo
}

action add_memo(input: AddMemo) -> MemoView {
    return MemoView {
        text: input.text
    }
}

type MemoSummary = Output {
    text: Memo
}

routes Memos {
    prefix: /memos

    POST / {
        input: AddMemo
        output: MemoSummary
        run: add_memo(input)
    }
}
```

```text
error: `POST /memos` sends `MemoSummary`, but `add_memo` returns `MemoView`
 --> main.jadpo:30:17
   |
30 |         output: MemoSummary
   |                 ^^^^^^^^^^^ not `MemoView`
  reason: A route's `output:` is exactly what it runs returns, so the route shows its contract and never sends a field its type doesn't declare.
  next: Write `output: MemoView` (agent)
  rule: route.output_mismatch
  help: https://jadpo.dev/docs/errors/route.output_mismatch

check failed: 1 error, 1 file
```
