Add the lastError property to the stream API.