Book Image

Mastering Web Application Development with Express

By : Alexandru Vladutu
Book Image

Mastering Web Application Development with Express

By: Alexandru Vladutu

Overview of this book

Table of Contents (18 chapters)
Mastering Web Application Development with Express
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Runtime (operational) errors and human errors


There are two big categories of errors: those that happen at runtime (also called operational errors) and bugs caused by programmers.

Some examples of the runtime errors include:

  • System out of memory

  • Failure to look up domains

  • Database connection time out

  • Failure to proxy requests because the server is down

These types of errors do not occur because our programs were badly written, but because a server is down, the network is unreliable, or some other problem that is not caused by an error in the code.

On the other hand, human errors are bugs and can be avoided, for instance:

  • Trying to read a property of an object that may be undefined

  • Calling a function with the wrong parameters

  • Specifying a bad path when requiring a Node module

Operational errors are unavoidable and can happen in any program, so they must be dealt with. Programmer errors, on the other hand, cannot be dealt with reliably. In these situations, we should log the error and let the server...