<!-- Source: @site/projects/sqlens-for-laravel/docs/rules/cap-l0-server-unreachable.md -->
<!-- Canonical: https://docs.pushery.com/sqlens-for-laravel/rules/cap-l0-server-unreachable/ -->

# CAP.L0.SERVER_UNREACHABLE — the connection could not be opened, so nothing was audited

> An empty report because the run never reached a database is not an empty report because the database is in good order.

- **Category:** safety
- **Level:** 0
- **Stability:** stable
- **Suites:** audit

The audit could not open its connection. No rule ran, no catalog row was read, and the report you are
holding is empty for that reason — not because the schema is in good order.

## The exit code, and why it is not 1

Exit code `1` in this package means **findings breached a gate**. A run that never reached a database
found nothing to breach anything, so returning 1 would tell every CI reading exit codes that problems
were found in a database nobody looked at.

This is an `undetermined` result and takes the code the contract assigns to that: **3 under
`--strict`, 0 otherwise**. If a pipeline should stop when the audit cannot run, that is what
`--strict` is for.

It is deliberately **not** reported as a misconfiguration either. A wrong host, a rotated password, a
firewall rule and a server that is restarting are indistinguishable from here, and calling all
four a config error sends an operator whose database is rebooting to go and edit a config file.

## What the message tells you, and what it will not

The driver's own words are carried through, with the connection's coordinates removed: no host, no
port, no database name, no role. What survives is the part that identifies the *kind* of failure —
the SQLSTATE, and whether the server refused the connection, refused the credentials, or was not
there at all.

## Related

- [Understanding `undetermined`](https://docs.pushery.com/sqlens-for-laravel/understanding-undetermined.md)
- [The public contracts](https://docs.pushery.com/sqlens-for-laravel/contracts.md) — the exit codes a pipeline branches on
