Skip to content

Commit 3640b39

Browse files
authored
better error message for return type of computer var (#4911)
1 parent dffaaa8 commit 3640b39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reflex/vars/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,7 @@ def _check_deprecated_return_type(self, instance: BaseState, value: Any) -> None
23182318
if not _isinstance(value, self._var_type, nested=1, treat_var_as_type=False):
23192319
console.error(
23202320
f"Computed var '{type(instance).__name__}.{self._js_expr}' must return"
2321-
f" type '{self._var_type}', got '{type(value)}'."
2321+
f" a value of type '{self._var_type}', got '{value}' of type {type(value)}."
23222322
)
23232323

23242324
def _deps(

0 commit comments

Comments
 (0)