![The 4am Fix](https://cdn.slatesource.com/a/a/0/aa0d7a2c-344a-4ebe-8779-a7e0ee16ac1c.webp)

# The 4am Fix

- [Made in Slatesource](https://slatesource.com/@steph/the-4am-fix)
- By [Steph](https://slatesource.com/@steph)
- Health & Wellness
- Created on Jul 20, 2026

python

1

2

3

4

5

6

7

8

9

```
# what I had been staring at since 22:00
if user.credits > 0 and item.in_stock:
    charge(user, item.price)

# what was actually happening
# charge() succeeded, the row never committed, and the except block
# below swallowed the rollback error into a log nobody was reading
except Exception:
    pass
```

19.05.2026 - 20.05.2026

## Six hours on four characters

The fix was deleting two words. The six hours went on believing the code I had written, because it read correctly and the AI that helped me write it agreed that it read correctly. Neither of us was reading the log. A bare except that swallows everything is the most expensive thing you can ship, because it turns a loud failure into a quiet one and quiet failures are the ones that take until four in the morning.

[The page I should have read in 2019](https://docs.python.org/3/tutorial/errors.html?utm_source=slatesource)