araeyn commited on
Commit
1f65f2f
1 Parent(s): ebc3ea5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -156,13 +156,15 @@ async def echo(websocket):
156
  while response.startswith("\n"):
157
  response = response[1:]
158
  await websocket.send(json.dumps({"response": response}))
159
- except Exception:
160
- pass
 
161
 
162
  async def main():
163
  try:
164
  async with serve(echo, "0.0.0.0", 7860):
165
  await asyncio.Future()
166
- except Exception:
167
- pass
 
168
  asyncio.run(main())
 
156
  while response.startswith("\n"):
157
  response = response[1:]
158
  await websocket.send(json.dumps({"response": response}))
159
+ except Exception as e:
160
+ print("Oops :P Something happened.")
161
+ print(type(e))
162
 
163
  async def main():
164
  try:
165
  async with serve(echo, "0.0.0.0", 7860):
166
  await asyncio.Future()
167
+ except Exception as echo:
168
+ print("Oops :P Something happened.")
169
+ print(type(e))
170
  asyncio.run(main())