Category: Appsmith Support
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

The action “<API_NAME>” has failed

Issue

I'm experiencing random errors on all my apps while running filters on the Table Widget JS to exclude/ include certain entries from the data-source. The solution is to refresh the page, but it's not consistent. The error message shows { "tableData":undefined }. I've tried adding filters in the API, but I'm still getting the error. The API is triggered on page load, and it happens with all my 8-10 apps running with Google Sheet as the data source. I suspect it's because of the pagination limit where I just put 1000 since these are test cases. I've also tried sending a sample set of data to Appsmith, and they couldn't reproduce the issue. Appsmith has advised increasing the query timeout and using server-side pagination to limit the error.

Resolution

The user is encountering a sporadic error on all their apps while attempting to filter data through a Table Widget using JavaScript. The API being called is basic, with no filtering applied. The user uses the API to gather data and applies filters later on, depending on specific conditions. The code being used to filter data is:

{{API.data.filter (item => item['Column Email :'] !== 'client@email.com' && item['Column ID Type'] == 'Normal')}}

To troubleshoot, the user shared screenshots of the error message, which showed the following error: { "tableData":undefined }. The user tried adding filters in the API itself, but the error continued to occur.

To further investigate the issue, the user shared sample data with Appsmith support, but no issues were found when trying to reproduce the error using the same query. However, Appsmith support suggested that network errors or query execution errors could be potential reasons for the problem.

To address the issue, the user manually increased the query timeout to 90,000-100,000 and used {{apiname.data.length}} in the server-side pagination to limit the error. The user hasn't encountered this error for the last 24 hours, and they plan to report back if it reoccurs. It seems that there's no concrete solution to this problem and that users might face such errors periodically.