diff --git a/sdk/core/core-client/src/serializer.ts b/sdk/core/core-client/src/serializer.ts index 51ee2a2e34ba..37dca771efa3 100644 --- a/sdk/core/core-client/src/serializer.ts +++ b/sdk/core/core-client/src/serializer.ts @@ -430,13 +430,13 @@ function serializeBasicTypes(typeName: string, objectName: string, value: any): const objectType = typeof value; if ( objectType !== "string" && - objectType !== "function" && + typeof value.pipe !== "function" && !(value instanceof ArrayBuffer) && !ArrayBuffer.isView(value) && !(value?.constructor?.name === "Blob") ) { throw new Error( - `${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.` + `${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or NodeJS.ReadableStream.` ); } }