@worktango/ai-assistant 0.0.100-beta.james.2 → 0.0.100-beta.james.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/express.js +6 -11
- package/package.json +1 -1
package/dist/express.js
CHANGED
|
@@ -10270,12 +10270,12 @@ function setupAiAssistantRoutes(args) {
|
|
|
10270
10270
|
(0, import_http_proxy_middleware.fixRequestBody)(proxyReq, req);
|
|
10271
10271
|
},
|
|
10272
10272
|
proxyRes: (proxyRes, req, res) => {
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10273
|
+
if (proxyRes.statusCode !== 200) {
|
|
10274
|
+
logger.error(`Proxy status ${proxyRes.statusCode}:`, {
|
|
10275
|
+
proxyResURL: proxyRes.url,
|
|
10276
|
+
reqURL: req.url
|
|
10277
|
+
});
|
|
10278
|
+
}
|
|
10279
10279
|
if (req.headers.accept === "text/event-stream") {
|
|
10280
10280
|
res.writeHead(res.statusCode, {
|
|
10281
10281
|
"Content-Type": "text/event-stream",
|
|
@@ -10285,11 +10285,6 @@ function setupAiAssistantRoutes(args) {
|
|
|
10285
10285
|
}
|
|
10286
10286
|
},
|
|
10287
10287
|
error: (err, req, res) => {
|
|
10288
|
-
console.log("PROXY ERROR", err);
|
|
10289
|
-
console.log("PROXY ERROR", err);
|
|
10290
|
-
console.log("PROXY ERROR", err);
|
|
10291
|
-
console.log("PROXY ERROR", err);
|
|
10292
|
-
console.log("PROXY ERROR", err);
|
|
10293
10288
|
logger.error("Proxy error:", err);
|
|
10294
10289
|
if ("headersSent" in res && !res.headersSent) {
|
|
10295
10290
|
res.statusCode = 502;
|