Customizing the error message in Opensearch Dashboards

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
I’m using Opensearch Dashboards 1.2.0

I have a scenario where my query will be failing due to missing fields in termsAgg. There I need to customize my message instead of directly showing the error message from opensearch API.

Found that the error message is from the Input Control viz plugin. Need some help on modifying and building the existing InputControlViz plugin.

Hey @Monisha_Sukumar

I havent Built/Modify InputControlViz plugin. Is it posible to show what you see with…

Hi @Gsmitt ,

"aggs": {
				"termsAgg": {
					"terms": {
						"order": {
							"_count": "desc"

Above is a part of OSD query which doesn’t have “field” property. While hitting this I get below error from Opensearch

"error": {
            "root_cause": [
                    "type": "illegal_argument_exception",
                    "reason": "Required one of fields [field, script], but none were specified. "

In the inputControlViz.plugin.js,
we have code to display the predefined message along with the error message from API.

                                  "Unable to fetch terms, error: {errorMessage}",
                                values: { errorMessage: _context.t0.message },

Now I need to change this "Unable to fetch terms" message to more specific to my application.
So is there any way to do it??