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
Simple ways to build robust software
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

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…