Hi everyone,
I am using Canvas plugin with a button that sends POST request to the endpoint.
The question is the following: is it possible to modify popup messages being displayed after the usage of the button?
For example, when everything is OK and endpoint returns 200, the displayed popup message is
“API call was successfull”:
If endpoint returns an error (for example, 503), the displayed message contains too many details on url etc.:
An error has occurred:
{“status”:503,“statusText”:“Service Unavailable”,“data”:{“message”:“Error: Requested service not found”,“error”:“Service Unavailable”,“response”:“Error: Requested service not found”},“config”:{“url”:“https://127.0.0.1:1880/test",“method”:“POST”,“data”:“{\“cmd\”:\“powerOn\”}”,“headers”:[[“Content-Type”,“application/json”]],“retry”:0,"hideFromInspector”:false}}
I would like to configure text shown in these messages, i.e. do not show extra details to user, display configured messages basing on error code, alter “API call was successfull” etc.
Is it possible to do by changing some settings? Which are the possible ways to solve this issue?
I’m using Grafana 10.2.1, Windows