Coding Fail of the Week (February 14-20, 2021)
2 min read
This is my first of many Coding Fails of the Week. In this edition, I won't even have to discuss the code because even a 5-year-old kid could spot the error.
How it happened: In constructing my Laravel API, I needed to test out the ability to add a post by a certain time. So I whipped out Postman, put in my date, and hit Enter. I swore it was error-proof; my API was working well earlier and the minor changes I made shouldn't have broken it. But alas, I got an error saying the date was in the wrong format. :/
What really happened: Biggest duh moment of my life. If you haven't seen the error yet, look carefully. Ignore the error message because it will throw you off. If you haven't seen it yet, I'll give you a clue: 2021 isn't a leap year. I spent about 90 minutes trying to find what was causing this issue when the answer was literally right there.
What I learned: Don't just look at the obvious. The real solution to our problems is often hidden in plain sight.