---
url: https://scruple.dev/rules/errors/no-swallowed-errors.md
description: Disallow silently suppressed unexpected failures.
---

# errors/no-swallowed-errors

Disallow silently suppressed unexpected failures.

## What it checks

Catch handlers should propagate or observably report unexpected errors, while intentional recovery and expected-exception fallbacks remain valid.

## Rule metadata

* Package: `@scruple/errors`
* Category: Error handling
* Tags: catch, propagation, reporting
* Default threshold: `0.9`
* Minimum confidence: `0.7`

## Examples

### Reported

```ts
try { await publish(); } catch { return false; }
```

### Accepted

```ts
try { await publish(); } catch (error) { logger.error({ error }, "Publish failed"); throw error; }
```
