-
Notifications
You must be signed in to change notification settings - Fork 56
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.kyma companionRelated to all activities around the Kyma CompanionRelated to all activities around the Kyma Companion
Description
Description
When I was working with my k3d (I know, chat doesn't work with local k3d but I don't know if problem lies here) and typed something to chat. The backend crashes.
My configuration:
busola:
KYMA_COMPANION enabled
backend:
default config.
Expected result
Even if chat is not available to use with k3d, the error shouldn't crash backend.
Actual result
Error log:
[backend] {"level":40,"time":1769785574830,"pid":147550,"hostname":"computer","req":{"id":"8ae6c486-a44e-45ab-a560-7beb7df4d6b9","method":"POST","url":"/backend/ai-chat/messages","apiServerAddress":"https://0.0.0.0:43963"},"err":{"type":"Error","message":"Invalid session ID ","stack":"Error: Invalid session ID \n at handler (/busola/backend/companion/companionRouter.js:133:13)\n at wrapper (/busola/backend/logging/index.js:34:5)\n at Layer.handleRequest (/busola/backend/node_modules/router/lib/layer.js:152:17)\n at next (/busola/backend/node_modules/router/lib/route.js:157:13)\n at /busola/backend/node_modules/express-rate-limit/dist/index.cjs:807:7\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at /busola/backend/node_modules/express-rate-limit/dist/index.cjs:691:5"},"msg":"Invalid session ID "}
[backend] /busola/backend/node_modules/express/lib/response.js:67
[backend] throw new TypeError(`Invalid status code: ${JSON.stringify(code)}. Status code must be an integer.`);
[backend] ^
[backend]
[backend] TypeError: Invalid status code: undefined. Status code must be an integer.
[backend] at ServerResponse.status (/busola/backend/node_modules/express/lib/response.js:67:11)
[backend] at handler (/busola/backend/companion/companionRouter.js:171:11)
[backend] at wrapper (/busola/backend/logging/index.js:34:5)
[backend] at Layer.handleRequest (/busola/backend/node_modules/router/lib/layer.js:152:17)
[backend] at next (/busola/backend/node_modules/router/lib/route.js:157:13)
[backend] at /busola/backend/node_modules/express-rate-limit/dist/index.cjs:807:7
[backend] at processTicksAndRejections (node:internal/process/task_queues:105:5)
[backend] at /busola/backend/node_modules/express-rate-limit/dist/index.cjs:691:5
[backend]
[backend] Node.js v22.18.0
Steps to reproduce
Troubleshooting
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.kyma companionRelated to all activities around the Kyma CompanionRelated to all activities around the Kyma Companion