3 ms·
The fact that they couldn't find it by looking at error logs is weird to me. This is an entirely forgivable error but should have been found the first time the
by AdamJacobMuller 2y ago
The fact that they couldn't find it by looking at error logs is weird to me.
This is an entirely forgivable error but should have been found the first time they got an email about it:
"Oh, look, the error logs have a duplicate key exception for the primary key, how do we generate primary keys.... (facepalm)"
Funnily enough, I saw the error in their snippet as soon as I read it but dismissed it thinking there was some new-fangled python feature which allowed that to work like the function def defines that default= accepts only functions so the function gets passed? -- I haven't kept up with modern python and that sounds cool and I figured the bug couldn't be THAT simple.
- dalemhurley 2y agoI was wondering that too. Why wouldn’t the error be in the logs?
- throwaway346434 2y agoGuess: the logs were on an ec2 instance that was thrown away regularly, and the overnight reports didn't give reproduce steps or timestamps; so when they checked it "works fine". There's value in having your backtrace surfaced to end users rather than swallowing an exception and displaying "didn't work".
- 8n4vidtmkvmk 2y agoI don't think showing stack traces to users is good practice? Every time one of my users gets a didn't work message I log the stack trace instead.
- dalemhurley 2y agoWhy would you show them a stack trace? This should be logged.
- erhaetherth 2y agoThat's what I said. Parent said > There's value in having your backtrace surfaced to end users
- AdamJacobMuller 2y agoit was on some temporary AWS service like lambda or something? (We had eight ECS tasks on AWS, all running five instances of our backend), but, regardless logs should be somewhere persistent. If they weren't, that should be the first thing you fix.