Incorrect behaviour for non-JSON responses.