More comprehensive error handling for server errors. Catch every error,
log it, and then redirect user to 500 error page.