mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Fix for node-crashing "undefined (reading 'streaming')" error (#4104)
* check for undefined variables in buildChatflow to avoid node crashing exceptions * Add null check on error Middleware as well
This commit is contained in:
@@ -12,7 +12,7 @@ async function errorHandlerMiddleware(err: InternalFlowiseError, req: Request, r
|
||||
// Provide error stack trace only in development
|
||||
stack: process.env.NODE_ENV === 'development' ? err.stack : {}
|
||||
}
|
||||
if (!req.body.streaming || req.body.streaming === 'false') {
|
||||
if (!req.body || !req.body.streaming || req.body.streaming === 'false') {
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
res.status(displayedError.statusCode).json(displayedError)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user