= Background
We would like to show a different type of preview for pages where it is not possible to get extracts. A generic special preview "We cannot show the preview" should be shown when we hit these pages.
{F8503553}
At the moment, Page Previews processes an extract that it gets from the service (MediaWiki API and RESTBase endpoint). It then tests whether the extract looks empty-ish in client side JavaScript. When the service can indicate that a preview is empty, then these tests should be removed from the codebase/PP should only rely on the service.
Related: T168392
= Implementation
Possible options:
* We should 404 if the extract is empty
* We should omit the extracts field
* We should provide an empty string
= Definition of empty
* If an extract field is an empty string and extract_html is also empty
* extract_html is empty when rendered has no [[ https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent | textContent ]]
= Open questions
* Which implementation?
* Which service?
* ~~
```Should we move extract processing to the server before tackling this? Or is it a part of this?~~ JR: I think this is out of scope. This is about what to do when the extract is empty.