GraphQL Error Handling

I have a GraphQL API that always returns 200 status codes even for errors (like all GraphQL APIs are supposed to), but it doesn’t seem like Appsmith has any special handling for this. If I try and specify an onError handler for an “Add New Row” action on a table widget, it doesn’t trigger the onError handler if the request returns an error. Are there any workarounds here?

Hello Dusan! Could you please send us a loom.com screen recording showing your implementation and the issue you get? Also, please send us a sample response of your query for this scenario.

Yes sure, here you go! Loom | Free Screen & Video Recording Software | Loom

Hi, based on what I can see, it appears that the API is not failing, but you are receiving an error message. I suspect that this error message was generated by your GraphQL server due to missing data or some other issue, but this does not necessarily mean that your API failed to send the data from Appsmith, which is why the error message is not displayed. You could create a more customized error message using a JavaScript function. Additionally, you could use Altair GraphQL to execute the same query and observe the response from your API. Would you like me to provide guidance on how to do this?