I wrapped Python traceback and Exception so whenever an Exception is raised, an automatic diagnosis is done by GPT-4. See results below:
This error message occurred because of 'test' at line 177 in file api.py, function main. The exception type is <class 'Exception'>. The function is: