Add middleware to show better 4xx, 5xx responses

Closes #46