Kevin Hu commited on
Commit
27a0991
·
1 Parent(s): 9ef0b16

refine the error message (#3382)

Browse files

### What problem does this PR solve?


### Type of change

- [x] Refactoring

Files changed (1) hide show
  1. api/apps/canvas_app.py +2 -2
api/apps/canvas_app.py CHANGED
@@ -119,10 +119,10 @@ def run():
119
  except Exception as e:
120
  return server_error_response(e)
121
 
122
- assert answer is not None, "Nothing. Is it over?"
123
 
124
  if stream:
125
- assert isinstance(answer, partial), "Nothing. Is it over?"
126
 
127
  def sse():
128
  nonlocal answer, cvs
 
119
  except Exception as e:
120
  return server_error_response(e)
121
 
122
+ assert answer is not None, "The dialog flow has no way to interact with you. Please add an 'Interact' component to the end of the flow."
123
 
124
  if stream:
125
+ assert isinstance(answer, partial), "The dialog flow has no way to interact with you. Please add an 'Interact' component to the end of the flow."
126
 
127
  def sse():
128
  nonlocal answer, cvs