Skip to content

Commit b1a0529

Browse files
committed
Add error when returning value in no output callbacks.
1 parent f1a92a3 commit b1a0529

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dash/_callback.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
Output,
1111
)
1212
from .exceptions import (
13+
InvalidCallbackReturnValue,
1314
PreventUpdate,
1415
WildcardInLongCallback,
1516
MissingLongCallbackManagerError,
@@ -467,6 +468,10 @@ def add_context(*args, **kwargs):
467468
raise PreventUpdate
468469

469470
if no_output:
471+
if output_value is not None:
472+
raise InvalidCallbackReturnValue(
473+
f"No output callback received return value: {output_value}"
474+
)
470475
output_value = []
471476
flat_output_values = []
472477
elif not multi:

0 commit comments

Comments
 (0)