solve closed socket bug, reject response if it has errors