add not_found error to validate_doc_read function