Handle the error and call build response for tests

The wsgi_app handler for tests ignored make_response when there were
errors and propogated them out of the stack. This patch would make the
test app handle errors and make responses from them just as the Nereid
app would have.