Skip to content
Snippets Groups Projects
Commit 02de0d26 authored by Chaza Abdelwahab's avatar Chaza Abdelwahab
Browse files

add changes

parent af2551bc
No related branches found
No related tags found
1 merge request!253Avoid giving 500 errors when corpus_id is not set
Pipeline #79802 passed
......@@ -212,7 +212,10 @@ class ElementsWorker(
element_id = element.id if element else item
if isinstance(e, ErrorResponse):
message = f"An API error occurred while processing element {element_id}: {e.title} - {e.content}"
if e.title == "404 Not Found":
message = f"An API error occurred while processing element {element_id}: ARKINDEX_CORPUS_ID was not set in the environment"
else:
message = f"An API error occurred while processing element {element_id}: {e.title} - {e.content}"
else:
message = (
f"Failed running worker on element {element_id}: {repr(e)}"
......
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