Fixing issue with body not being set when halting a request with a status code or raised exception