G
22

Spent three days fixing a single line in a script that broke our whole reporting system

We had this old script that pulls sales data, and it just stopped working on Monday. I mean, it was running fine for months. I checked the database, the server logs, everything. Turned out the API endpoint we were calling changed its format slightly, so the script was getting empty data back. I had to dig through like 200 lines of code to find the one spot where it parsed the response. Has anyone else had a tiny change in a third-party tool just wreck your whole day?
2 comments

Log in to join the discussion

Log In
2 Comments
jason328
jason32810d ago
Actually, that's kind of on your team for not building in better error handling. If one line change breaks everything, the script was probably too fragile from the start. Third-party APIs change all the time, it's just part of the job. You should expect it and write code that fails more gracefully, maybe with some basic checks on the data it gets back. Relying on an outside service to never change is a bit naive.
7
the_sarah
the_sarah10d ago
Our payment processor did that with a date field last month.
5