Skip to content
Snippets Groups Projects
Commit 52b6d535 authored by Chaza Abdelwahab's avatar Chaza Abdelwahab Committed by Yoann Schneider
Browse files

Avoid giving 500 errors when corpus_id is not set

parent 240ad121
No related branches found
No related tags found
1 merge request!253Avoid giving 500 errors when corpus_id is not set
Pipeline #79818 passed
......@@ -193,6 +193,10 @@ class BaseWorker(object):
# Define corpus_id from environment
self.corpus_id = os.environ.get("ARKINDEX_CORPUS_ID")
if not self.corpus_id:
logger.warning(
"'ARKINDEX_CORPUS_ID' was not set in the environment. Any API request involving a `corpus_id` will fail."
)
# Load all required secrets
self.secrets = {name: self.load_secret(name) for name in required_secrets}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment