Skip to content

Commit be305f0

Browse files
committed
Improve error message
1 parent e2f7884 commit be305f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dash/dash.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,10 @@ def dispatch(self):
10681068

10691069
args = inputs_to_vals(inputs + state)
10701070

1071-
func = self.callback_map[output]["callback"]
1071+
try:
1072+
func = self.callback_map[output]["callback"]
1073+
except KeyError:
1074+
raise KeyError("Callback not found, maybe you forgot to prepend the '@'?")
10721075
response.set_data(func(*args, outputs_list=outputs_list))
10731076
return response
10741077

0 commit comments

Comments
 (0)