# `failure.outcome_success_duplicate`

Outcome match repeats its success arm.

Area 3, [Logic](../topics/logic.md); not declinable; the next step is usually the agent's.

```jadpo
function duplicate_success(key: LookupKey) -> LookupResult {
    return match lookup(key) {
        success(value) -> value
        success(other) -> other
        LookupMissing -> "missing"
        LookupRefused -> "refused"
    }
}
```

```text
error: The success arm is written twice
 --> main.jadpo:4:9
  |
3 |         success(value) -> value
  |         -------------- first matched here
4 |         success(other) -> other
  |         ^^^^^^^^^^^^^^ matched again
  reason: A call succeeds one way, so one `success(...)` arm takes its value; this one would never run.
  next: Remove this arm, or merge its body into the first (agent)
  rule: failure.outcome_success_duplicate
  help: https://jadpo.dev/docs/errors/failure.outcome_success_duplicate

check failed: 1 error, 2 files
```
