# PASS_HOOK_FAILED

score, accept or report raised an error or returned a value Forge cannot use.

## What happened

One of the three hooks that run after a pass, `score`, `accept` or `report`, raised an error or returned a value Forge cannot use.

### Common causes

- The hook raised an error. The message names the file, the line and the function.
- `score` returned a value that is not a finite number.
- `accept` returned a value that is not `True` or `False`.
- `report` returned something that is not a dict of names to numbers.

## What to do

Return a finite number from `score`, `True` or `False` from `accept`, and a dict of names to numbers from `report`.

### Related

- [Strategy](https://oathra.dev//reference/forge/strategy/Strategy)

## Example

```text
strategy.py, line 44, in score: score raised ZeroDivisionError: division by zero [PASS_HOOK_FAILED]
strategy.py, in score: score returned nan, not a finite number [PASS_HOOK_FAILED]
strategy.py, in accept: accept must return True or False, got int [PASS_HOOK_FAILED]
```

The wording of the message depends on your file, and the code does not. A value Forge cannot use has no line of its own.
