framework icon indicating copy to clipboard operation
framework copied to clipboard

Bad developer experience when debugging custom checks

Open ipimpat opened this issue 3 years ago • 1 comments
trafficstars

Bad developer experience when debugging custom checks.

If there is a code error/exception raised in a custom check, it would be nice if execution was stopped and the error was printed, because currently Frictionless seems to "eat" the error/exception details when executing tasks, making it very hard to debug.

Here is an example of the report returned by the validate function, when there is a code error in one of my custom checks.

{'errors': [{'code': 'task-error',
             'description': 'General task-level error.',
             'message': "The task has an error: 'NoneType' object is not "
                        'iterable',
             'name': 'Task Error',
             'note': "'NoneType' object is not iterable",
             'tags': []}]
 'stats': {'errors': 1, 'tasks': 0},
 'tasks': [],
 'time': 2.141,
 'valid': False,
 'version': '4.40.8'}

it would be nice if Frictionless didn't "eat" exceptions, so I actually can see where the error originated from.

In this case I ended up rewriting my whole custom check, because I couldn't find the line, that was causing the issue.

Version: frictionless==4.40.8

ipimpat avatar Nov 10 '22 15:11 ipimpat

Thanks, @ipimpat! We will work on a better debug workflow

roll avatar Nov 14 '22 08:11 roll