You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making a request with a larger page size (for the data set I'm testing with, anything above pageSize: 38), the SDK request hangs if a post middleware is set. It does not seem to matter what is happening in the middleware - just a log statement causes this problem.
The request completes as expected if the page size is set lower. It also completes for a larger page size (up to the API's limit of 100) if no middleware is set.
I am wondering if it's an issue with the use of response.clone()here. I see a potentially related open issue for node-fetch here.
Let me know if you have any suggestions on how to resolve this, or if I can provide more information!
Sample code:
import{Configuration,HRIS}from"@mergeapi/merge-sdk-typescript";importfetchfrom"node-fetch";constpost=async()=>{console.log("post middleware");};constapiConfig=newConfiguration({accessToken: "<redacted>",apiKey: "<redacted>",basePath: "https://api-eu.merge.dev/api",fetchApi: fetch,middleware: [{ post }],});constapi=newHRIS.EmployeesApi(apiConfig);constresponse=awaitapi.employeesList({pageSize: 39});
Issue:
When making a request with a larger page size (for the data set I'm testing with, anything above
pageSize: 38
), the SDK request hangs if a post middleware is set. It does not seem to matter what is happening in the middleware - just a log statement causes this problem.The request completes as expected if the page size is set lower. It also completes for a larger page size (up to the API's limit of 100) if no middleware is set.
I am wondering if it's an issue with the use of
response.clone()
here. I see a potentially related open issue for node-fetch here.Let me know if you have any suggestions on how to resolve this, or if I can provide more information!
Sample code:
Version info:
The text was updated successfully, but these errors were encountered: