bug fix for error response

I've got a case, where $body was pure html.