How Error Handling and Debugging Are Making Me a Better Developer

Error handling and debugging are not the most exciting part of programming. However, they're a crucial part in deeply understanding data structures, best practices, and the technologies I employ to build applications. Each bug forces me to think critically, revisit my code, and sharpen my understanding of both the code and the system it runs on. These challenges have transformed into learning opportunities, pushing me to write cleaner, more robust applications. Here's how embracing the messy side of development is making me a stronger, more thoughtful engineer.

7/3/20252 min read

The Importance of Error Handling in Development

Error handling is a crucial component in any software development process. It allows developers to anticipate problems before they become critical issues. In my recent project, I've found that implementing a three-layer error handling strategy that covers client, Apollo, and resolver levels has significantly improved my coding skills. This layered approach helps me catch errors, improve user experience, and ensures that I am following industry best practices, which is essential as a growing developer.

Gaining Insights Through Debugging

Over the past three weeks, the biggest lesson I’ve learned is how critical error handling and debugging are for understanding a codebase, building solid applications and for becoming a better programmer. Working on implementing a three-layer error handling strategy (client, Apollo, and resolver levels) has deepened my understanding of Apollo Server, GraphQL, React Error boundaries, hooks, rendering, and industry best practices. I remember seeing wrapper functions five years ago and being completely lost. Now, working with them in a real-world context feels like proof of how far I’ve come. Debugging issues across React, Apollo server/client, and MongoDB has made me sharper, more knowledgeable, and more confident. This process doesn’t just improve my applications and user experience. It’s actively shaping me into a more advanced, capable developer.

Applying It in the Real World: Upgrading BacklogBoss

While learning about error boundaries, async error handling, and Apollo error links, I was applying these improvements directly to my personal full-stack app, BacklogBoss. BacklogBoss is a game-tracking and review-sharing app I’ve been building as a passion project and skills showcase. It combines React, Apollo, GraphQL, MongoDB, and a ton of custom UI logic. Therefore robust error handling isn’t just nice to have, it’s critical.

Here’s what I implemented:

  • App-level error boundaries to prevent app crashes and/or white screens when entire pages fail

  • Apollo Client type policies

  • A single, adaptive ErrorFallback component that renders cleanly across full pages

  • Apollo Server format errors

  • Custom feedback for async mutation failures (e.g., image uploads, friend requests, etc.)

What I Learned:

  • Error boundaries don’t catch everything. They only catch render-time errors. Async and render errors are fundamentally different, and require different error handling.

  • A good fallback UI is a UX feature that builds trust with users

  • Clean error handling across layers (client, server, network) makes you feel more in control as a developer and that confidence shows in the product

From Confusion to Confidence

Five years ago, I remember feeling utterly perplexed by the concept of React, wrapper functions, APIs, and error handling techniques. Today, the circumstances are remarkably different. Delving deeper into these topics while working on real-world projects has been instrumental in transforming my skill set. Each experience has contributed to a clearer understanding and a greater proficiency with the MERN stack including Apollo server, GraphQL, API testing, and data types.

As I continue to navigate through various development challenges, I’ve started to write cleaner code with bugs in mind. As I improve at using these technologies, the features I build from scratch will include tools like TypeScript, testing libraries, and bug logging services like Sentry to ensure that my applications are robust, well-documented, and scalable.

In conclusion, focusing on error handling and debugging has catalyzed my progress as a developer. Every error encountered, although tedious, is a stepping stone towards mastery in my tools and programming practices.