Skip to content

Commit a3305b3

Browse files
authored
Add comment
1 parent 467b164 commit a3305b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

shiny/_app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ def init_starlette_app(self):
164164
middleware.append(
165165
starlette.middleware.Middleware(InjectAutoreloadMiddleware)
166166
)
167+
# In Pyodide mode, an HTTPException(404) being thrown resulted in
168+
# some default error handler (that happened not to be async) being
169+
# run in a threadpool, which Pyodide could not handle. So in Pyodide
170+
# mode, install our own async error handler at the outermost layer
171+
# that we can.
167172
if is_pyodide:
168173
middleware.append(starlette.middleware.Middleware(ErrorMiddleware))
169174

0 commit comments

Comments
 (0)