Fix issue where a stacktrace occurred if there was no response body.