Skip to content

Commit 534e582

Browse files
N-giveNathan Givens
andauthored
IWF-687 include full stacktrace when filename not found (#96)
* IWF-687 include full stacktrace when filename not found --------- Co-authored-by: Nathan Givens <[email protected]>
1 parent 5d7ec43 commit 534e582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iwf/worker_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def internal_error(exception):
6464
return _worker_service.handle_worker_error(exception), 500
6565
"""
6666
stacktrace = traceback.format_exc()
67-
index = stacktrace.index("iwf-python-sdk/iwf/worker_service.py")
67+
index = max(0, stacktrace.find("iwf-python-sdk/iwf/worker_service.py"))
6868
return "WorkerExecutionError: {0}; StackTrace:{1}".format(
6969
exception, stacktrace[index:]
7070
)

0 commit comments

Comments
 (0)