wsgi_wrapper: ensure error handling doesn't throw decoding errors