I faced an issue where the response content cannot fit into a Node.js string, and this does not throw an error from the client. It just logs:
Error: Cannot create a string longer than 0x1fffffe8 characters
at TextDecoder.decode (node:internal/encoding:449:16)
at utf8DecodeBytes (node:internal/deps/undici/undici:2973:34)
at parseJSONFromBytes (node:internal/deps/undici/undici:4306:25)
at successSteps (node:internal/deps/undici/undici:4288:27)
at fullyReadBody (node:internal/deps/undici/undici:2724:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async consumeBody (node:internal/deps/undici/undici:4297:7)
at getResponseBody (/xxxxxxxx/core/request.ts:217:13)
at <anonymous> (/xxxxxxxx/core/request.ts:322:26) {
code: 'ERR_STRING_TOO_LONG'
}
The return parameter is just undefined so I have so use an assertion to throw in case of an error.
I think it should be fixed and at least documented because it break a sensitive logic.
Description
Hi,
I faced an issue where the response content cannot fit into a Node.js string, and this does not throw an error from the client. It just logs:
The return parameter is just
undefined
so I have so use an assertion to throw in case of an error.I think it should be fixed and at least documented because it break a sensitive logic.
Reproducible example or configuration
No response
OpenAPI specification (optional)
No response
System information (optional)
I'm using the latest version
v0.49.0