I was recently investigating the new Saturn Sky convertible on their website and tried out their “build your own” application.
To my surprise I saw this screen:
As you can see, I had two options for the Sky: the base model and an “undefined” model. Today the site is corrected, but that doesn’t change the fact that a little programming or database error made it all the way to my browser.
Double Check Data
“Undefined” errors are usually exceptions that aren’t properly handled in the code. These can easily slip in when assumptions are made about the availability of a variable or data from a database.
Always check to make sure you really have the data you think you do before showing it to the customer. “Undefined” cases should be hidden if they are encountered or you should safely default to an appropriate value.
Error Pages
In the worst case, you can always direct a user to a generic error page that tells them you’re having technical difficulties. Explain how they can start over or how to contact you if needed.
Be Aware
You need to know when such errors are encountered so that you can correct your code with your next software release. When an error occurs, you can automatically email your programmer or log these types of errors for future analysis.