I was working on adding new features for my blog. While testing the blog, I noticed a serious issue: the refresh token was not working under certain conditions.
My API endpoint didn't include the "api/v1" and I skimmed through that code multiple times but didn't notice that tiny bug because I was in a hurry or working on other features. Yesterday, I was checking the requests and noticed that I wasn't calling the actual refresh URL. I found it pretty hilarious, honestly. See the image.
I didn't know what hurry I was in, but I stopped yesterday and noticed the error. I guess that error was partly my fault because I didn't write test code. This error made me realize why writing and testing apps matter. I'll be learning to write tests.
It's also important to take breaks. When we're constantly rushing from one feature to another, we often miss simple mistakes that could save us hours of debugging later. Taking a step back and giving our minds a rest can help us see problems with fresh eyes.
Check the full commit here: https://github.com/joybiswas007/blog/commit/c3cbc88c6823fdc0f3252a8f8f8c2c62756fd56e
Top comments (0)