created FriendlyError middleware

this addresses #1

would appreciate a thorough review by @cdent (see commit message)