Effect CommunityEC
Effect Community13mo ago
6 replies
Sly

Troubleshooting Stream Payload Issues in Effect Typescript Library

Given I want a client to send a stream as payload, what would I need to do? My request doesn't seem to hit either the correct handle or handleRaw and fails with an internal server error.

Payload is defined as:
    .setPayload(
                Schema.String.pipe(
                    HttpApiSchema.withEncoding({
                        kind: "Text",
                        contentType: "application/octet-stream",
                    }),
                ),
            )


which might be the source of the trouble.

Logs when deployed unfortunately also just show Maximum call stack size exceeded

RangeError: Maximum call stack size exceeded at get arrayBuffer (index.js:53023:18) at get arrayBuffer (index.js:53024:14) at get arrayBuffer (index.js:53024:14) at get arrayBuffer (index.js:53024:14) at get arrayBuffer (index.js:53024:14) at get arrayBuffer (index.js:53024:14) at get arrayBuffer (index.js:53024:14) at get arrayBuffer (index.js:53024:14) at get arrayBuffer (index.js:53024:14) at get arrayBuffer (index.js:53024:14) at http.server PUT

"{ \"_id\": \"@effect/platform/HttpServerResponse\", \"status\": 500, \"headers\": {}, \"cookies\": { \"_id\": \"@effect/platform/Cookies\", \"cookies\": {} }, \"body\": { \"_id\": \"@effect/platform/HttpBody\", \"_tag\": \"Empty\" }}"
Was this page helpful?