When we use CRM API, can we hide the wrong stack information in the production environment.
*This post is locked for comments
I have the same question (0)

When we use CRM API, can we hide the wrong stack information in the production environment.
*This post is locked for comments
I have the same question (0)You can use Failure callback handler & try catch block to capture the non-friendly errors/exceptions to give some user friendly alerts.
Xrm.WebApi.createRecord("new_entity", data)
.then(
(success) => {
//do something
},
function (error) {
//debugger;
var alertStrings = {
confirmButtonLabel: "OK",
text: "Something went wrong. Please Contact Support team."
}
Xrm.Navigation.openAlertDialog(alertStrings)
.then(
function (result) { //successCallback
},
function (error) { //errorCallback
//console.log(error.message);
}
);
}
);