Throughout our code base we use
throw 'Error', in lightning, to prevent code from continuing. There are times we display our own error toast and do not care for the Salesforce provided one.
How can I prevent this dialog from popping up?
(I understand removing the
throw clauses will prevent this, and maybe it's a hack to use
throw to drop out of the code, however for now I would prefer a method to remove this popup instead of removing the
Removing lighting debug mode did not seem to work.
This only seems to occur in Production, not in scratch orgs.