-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Forge - App Monitoring, Logging
Issue Summary
We have received some complaints from partners regarding the 429 responses received when hitting platform limits seen in the documentation below:
The response text observed on Developer Console is too generic and does not help the partner to identify which limit they are hitting so they can implement back-off algorithms on their side.
For example, when hitting the network requests limit per invocation (limit of 100 requests) when we reach the 100th call, we receive the 429 response showing
- statusText: 'Too Many Requests', only;
- The header has a{} 'forge-proxy-error': [ 'FETCH_LIMIT_EXCEEDED' ], only
Steps to Reproduce
- Create a Forge uikit2 app.
- Create a resolver function that calls an external URL in a 100x loop similar to the one below:
-
resolver.define('fetchJsonplaceholder', async () => { console.log("Executing fetchJsonplaceholder"); var respApi = undefined; for (let i = 0; i <= 100; i++){ try { //console.log("Inside Try block for simple FETCH request"); var response = await fetchWithTimeout('https://jsonplaceholder.typicode.com/posts/1', {}, 5000); //console.log("After simple API execution"); //const responseData = await response.json(); //console.log("Simple API response", responseData); console.log(`i = ${i} - `, response.status); if (i > 95){ console.log(response.headers); //console.log(response); } if (response.status == 429){ console.log(response.headers); console.log(response); } } catch (error) { console.log("Caught error in outer block:", error); } } return "test"; });
-
Run the app and observe the output logged by the console.log() statements.
- When we reach the 100th call, we receive the 429 response The response shows statusText: 'Too Many Requests', only; The header has a{} 'forge-proxy-error': [ 'FETCH_LIMIT_EXCEEDED' ], only
Expected Results
- The 429 response has enough information to help the partner to identify which limit they are hitting so they can implement back-off algorithms on their side.
- For example something like Exceeded maximum number of outbound network calls per invocation (100)
Actual Results
- The response text is too generic and does not help the partner to identify which limit they are hitting so they can implement back-off algorithms on their side.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- mentioned in
-
Page Loading...