Skip to content

Commit

Permalink
Handle R errors caused by lazy evaluation in func wrappers properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rikardn committed May 24, 2024
1 parent 46ae047 commit 953f73f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deploy/func_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def _create_func_body_modeling(func, func_execute):
def _create_func_body_tool(func, func_execute):
error_msg = [
'err <- reticulate::py_last_error()',
'if (err$type == "InputValidationError") {',
'if (is.null(err)) {',
' message(cond)',
'} else if (err$type == "InputValidationError") {',
' message(err$value)',
'} else {',
' message(\'Full stack:\')',
Expand Down

0 comments on commit 953f73f

Please sign in to comment.