Error Logging

Learn what error logging is and why adding this functionality into the API layer is important.

We'll cover the following

It’s good practice to not leave console.log/console.error calls spread around in our production code. However, if we don’t have any error logging, it can hurt us in the long run. Therefore, it’s a good idea to incorporate at least some kind of error logging. Adding logging for every API request would be quite tedious. Therefore, we can again take advantage of the API layer and add logging functionality inside of it, as shown below.

Get hands-on with 1200+ tech skills courses.