![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)
- Created on Jul 20, 2026

MOMENT

04:12, a Tuesday

The line that had been lying for six hours

python

1

2

3

4

5

6

7

8

9

10

```
# 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

## SixSix hourshours on fourfour characterscharacters

The fixfix was deletingdeleting twotwo wordswords. The sixsix hourshours wentwent on believingbelieving the codecode I had writtenwritten, becausebecause it readread correctlycorrectly and the AI that helpedhelped me writewrite it agreedagreed that it readread correctlycorrectly. NeitherNeither of us was readingreading the loglog. A barebare exceptexcept that swallowsswallows everythingeverything is the mostmost expensiveexpensive thingthing you can shipship, becausebecause it turnsturns a loudloud failurefailure into a quietquiet oneone and quietquiet failuresfailures are the onesones that taketake untiluntil fourfour in the morningmorning.

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