Hey, I was going through the platform/backend/src/routes/chat/routes.chat.ts file and noticed this check.
Since we’re using includes("write after end"), maybe we could make it a bit safer with:
err.message?.toLowerCase().includes("write after end")
Also, since err.code === "ERR_STREAM_WRITE_AFTER_END" is already there,
that might be more reliable, with message as a fallback.