Avoid giving 500 errors when corpus_id is not set
When running the worker locally, the RetrieveCorpus
operation fails with an ugly 500 error when the ARKINDEX_CORPUS_ID
was not set in the environment.
We could do an assertion instead with a nicer log message explaining what is happening.
2022-11-02 13:35:55,658 WARNING/arkindex_worker: An API error occurred while processing element d0533315-e5a1-4194-89b0-1ccdc8f7059a: 404 Not Found -
<!doctype html>
<html lang="en">
<head>
<title>Not Found</title>
</head>
<body>
<h1>Not Found</h1><p>The requested resource was not found on this server.</p>
</body>
</html>