add error middleware
fix duplicated error catcher
Merge pull request #63 from thelac/michael/error-middleware

add error middleware