Disable Appsmith Debug Toasts

how can we disable the error Toasts shown in Appsmith when any action fails as suppose if we want to configure our own error messages for an action to fail,what is the setting for that, not able to find anything yet.
image
First message is the custom error message i want to add in for action of API call on button and second message is the default error toasts by AppSmith.Want to disable the second message.

Hello! You can run the query/API inside an async JS function and use a try/catch block. In the catch block you can show a custom message in case the action fails.
Here’s our doc on JS Objects.