Skip to content

Commit

Permalink
fix(serializeUtils): preserve empty request/response bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Dec 12, 2024
1 parent c069b25 commit c2d5c13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/utils/request/serializeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export function deserializeRequest(serialized: SerializedRequest): Request {
export async function serializeResponse(
response: Response,
): Promise<SerializedResponse> {
const responseBody = await response.clone().arrayBuffer()
const responseBody =
response.body === null ? undefined : await response.clone().arrayBuffer()

return {
__serializedType: 'response',
Expand Down

0 comments on commit c2d5c13

Please sign in to comment.