Better Programming

Advice for programmers.

Follow publication

You're unable to read via this Friend Link since it's expired. Learn more

Member-only story

5 Tips To Quickly Tackle Errors in Your Production Code

Bikash Paneru
Better Programming
Published in
6 min readJan 26, 2021
computer code on a screen
Photo By Markus Spiske on Unsplash

Developers often write test cases along with their code. On top of that, they even add some exploratory testing to their work pipeline. However, sometimes, there are some errors that escape their well-thought-out testing processes and end up in production.

A lot of these errors are experienced and discovered by the end users — some of them might report the problem, some might try later, or some might outright reject the product because of the error.

Thus it is important to be able to quickly react to errors that occur in production. It’s easy to debug and fix an error when working in the local development environment simply because everything is under the developer’s control. In contrast, finding errors in code running on production is a different task altogether. Finding errors in frontend applications is even more difficult because the code runs on the client’s device.

We will take a look at some simple solutions that can be used to find errors in production as well as ways to react to them as quickly as possible.

1. Use Error Reporting Services

Sentry error reporting screen
Sentry.io Error Reporting

These services can be used to catch exceptions that occur within the application but are not handled. The errors are reported by these services along with the stack trace as well as the actual code where the error occurred. On top of that, they can be customized to report any other data along with the error. This is the easiest solution that can be used to detect actual errors that break the software and ruin the user’s experience.

Example of information obtainable from these services

  • The actual error that occurred
  • The line number in which the error occurred
  • The stack trace of the moment when the error occurred
  • How many times and when a specific error occurred
  • In a frontend application, we could have the current URL and even the…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Bikash Paneru
Bikash Paneru

Written by Bikash Paneru

Technology for Passion, Noodles for Hair and Junk for Food. https://mrdivinemaniac.github.io/

No responses yet

Write a response