Skip to main content

environment: sandbox, have not tried in prod environment

code:

const cvAttachment: Attachment = {filename: fName,
content: fs.createReadStream(fName), contentType: "application/pdf"};
let faxRequest: CreateFaxMessageRequest =
{ to: [{ phoneNumber: coverLetterRequest.toFax }],faxResolution: "High",
coverPageText: "CoverPage Attached", coverIndex: 0,
attachments: [cvAttachment]};
const faxResponse: FaxResponse = await rc.restapi().account()
.extension().fax().post(faxRequest);


error:

Executed 'Functions.Fax340b' (Failed, Id=80b76844-bcf2-4665-a39b-dd5fda1b85c9, Duration=17604ms)
System.Private.CoreLib: Exception while executing function: Functions.Fax340b. System.Private.CoreLib: Result: Failure
Exception: source.on is not a function
Stack: TypeError: source.on is not a function
at DelayedStream.create (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/delayed-stream/lib/delayed_stream.js:33:10)
at CombinedStream.append (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/combined-stream/lib/combined_stream.js:45:37)
at FormData.append (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/form-data/lib/form_data.js:75:3)

What is that RingCentral extensible and where do you get it from?


Thanks @Phong Vu for your response. We have been using https://github.com/ringcentral/ringcentral-extensible for the last year or more I was told RC support had suggested we use it. It seems it is buggy. What do you suggest?


@Tyler Liu Can you check this? Thanks


I believe this is a breaking change of node.js. If you downgrade node.js to version 16 or lower, the issue will disappear.

Or you upgrade to @rc-ex/core 1.0.1.alpha.0, which has fixed this issue. We cannot make change to 0.15.0 any more because it is an already published version.


I believe this is our sandbox environment cloudflare configuration blocked your request. You may ignore it and test it in production environment.


Reply