Error controller to handle HTTP errors.

Fixes #257 and #310.
Why do you need to do that? It's not a redirect.