0

We work with Autodesk FORGE REST API with forge-apis library. Since today we have an unstable behaviour when calling its methods. Here is the error:

address: “34.203.81.163” code: “ETIMEDOUT” errno: “ETIMEDOUT” port: 443 syscall: “connect” message: “connect ETIMEDOUT 34.203.81.163:443” stack: “Error: connect ETIMEDOUT 34.203.81.163:443↵ at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1162:14)”

Is there something we need to change in our code or we're getting to some threshold in a number of API calls or this is a temporary internal instability?

1 Answer 1

1

There is a default HTTP timeout, 60000 milliseconds, in the src/ApiClient.js. When you received this message, it means that you didn't get the response from Forge server after 60000 milliseconds. Please try to increase the timeout value of the ApiClient. Here are two ways to make this change:

Method 1:

var bucketsApi = new ForgeSDK.BucketsApi();
bucketsApi.apiClient.timeout = 2 * 60000;

var objectsApi = new ForgeSDK.ObjectsApi();
objectsApi.apiClient.timeout = 2 * 60000;

Method 2:

var apiClient = new ForgeSDK.ApiClient();
apiClient.timeout = 2 * 60000;

var bucketsApi = new ForgeSDK.BucketsApi( apiClient );
var objectsApi = new ForgeSDK.ObjectsApi( apiClient );

Hope it helps!

Cheers,

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.