TypeError on HTTP 400 or non-HTTP errors when starting a workflow on a corpus
Sentry Issue: ARKINDEX-FRONTEND-4T
TypeError: t.sent is undefined
at D (None:15:3)
at o (None:15:3)
...
(1 additional frame(s) were not displayed)
The Sentry traceback is a little hard to read this time; display the full trace (not the App
button) and compare the original and minified versions. t.sent
is actually resp
from this line. The TypeError occurs because resp
is undefined, since the await
returns nothing.
The issue comes from the catch
in the corpusWorkflow
action: the action will only throw an exception when the error has a response attribute and its status is 400 (see here). Otherwise, it will not throw, and the caller will not be able to tell if something went wrong.