In this post I pretend to share only one way to do friendly error page (500) and not found (404) page in Sitecore. I say one way because this is just one way to do this since you might find another that suits best your needs. This first part includes Sitecore items and config changes. Last but no least, I am using a version 8.1 update 2.
To begin, let’s create a template for the error pages that can be as complex as you need, but here is just an example with one field for the error code:


