Partially done in: https://gerrit.wikimedia.org/r/c/mediawiki/services/citoid/+/1031870
This now returns a 415 error in citoid; however restbase/hyperswitch doesn't return the native error message in citoid so it just says
{ "type": "https://mediawiki.org/wiki/HyperSwitch/errors/unknown_error", "method": "get", "uri": "/en.wikipedia.org/v1/data/citation/mediawiki/https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F9%2F98%2FColoring_page_for_Wikipedia_Day_2019_in_NYC.pdf" }
Needs follow up to:
- Detect content-type in citoid first (currently this is done only in Zotero)
- Return specific content-type in error, i.e. 'application/pdf'
- Allow restbase/hyperswitch to correctly pass through the error itself. Slightly complicated by restbase decomm being in progress.