[doc] add error property to write in response