render error page before handling
Merge pull request #339 from squirrelo/better-error-handling

Render error page before handling